Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rewrite condition catchall if the URI doesn't start with this

So I have this rewrite condition at the bottom of my .htaccess file as a catchall. works great, but I want it to ignore any requests and begin with "/index.cfm"

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule (.+) /index.cfm?event=baduri&uri=$1 

so /index.cfm?fddssds would not be touched

but /gdfgdfgdfdgf would be redirected..

like image 929
Jeff Gladnick Avatar asked Feb 13 '12 00:02

Jeff Gladnick


1 Answers

Can you try this and let me know:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/index.cfm
RewriteRule (.+) /index.cfm?event=baduri&uri=$1 [L,NC]
like image 75
Book Of Zeus Avatar answered Nov 09 '22 12:11

Book Of Zeus