.htaccess wildcard problem
Posted
by niggles
on Stack Overflow
See other posts from Stack Overflow
or by niggles
Published on 2010-06-07T23:15:05Z
Indexed on
2010/06/07
23:22 UTC
Read the original article
Hit count: 194
I've come across a problem with an .htaccess rule I can't sort out. It works on my MAMP stack and it works on 3 other servers, but it won't work on a particular server and keeps giving me a "500 error with an additional 302 error".
It's the wildcard that's throwing it and from Google research it says it may be because of an infinite loop, but it works on other servers just fine.
The site in question is being developed in a sub-directory, but then again, so have the other sites:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
/public has it's own .htaccess file that is:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
Any suggestions as mod_rewrite's not my specialty and I can't seem to fix this.2
© Stack Overflow or respective owner