mod_rewrite redirect everything but a certain file

New to mod_rewrite? This is a good place to start.

mod_rewrite redirect everything but a certain file

Postby vh1 » Wed Feb 04, 2004 12:56 pm

hey, how would I get mod rewrite to:
redirect entry/([0-9]+) to index.php?id=$1
and everything else to redirect to index.what.html

I've tried this (and variations), but nothing works
RewriteCond %{REQUEST_URI} entry/([0-9]+)
RewriteRule entry/([0-9]+) index.php?id=$1 [L]
RewriteCond %{REQUEST_URI} !entry$
RewriteRule ^(.) index.what.html [L]
vh1
 

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 38 guests

cron