Htaccess help, $1 being used before its set??? what?

Posted by jiexi on Stack Overflow See other posts from Stack Overflow or by jiexi
Published on 2010-03-04T06:14:28Z Indexed on 2010/03/08 17:36 UTC
Read the original article Hit count: 145

I have this snippet

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond $1 !^(index\.php|images|img|css|js|robots\.txt)
RewriteRule (.*) index.php?/$1 [L] 

It won't allow me to access a file at website.com/js/main.php but it will let me access index.php

According to my webhost, $1 is being called before it is set. Any solutions?

I'll accept answers when i get back tomorrow. Thank you!

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about mod-rewrite