1
votes

I just set up WAMP to develop a new site and when I added an .htaccess file that throws all URLS to my url handler file, I get 500 server errors. I'm guessing it's some kind of syntax error? I do have the rewrite module enabled in apache.

here's the .htaccess file:

Options     +FollowSymLinks 

RewriteEngine   ON
RewriteRule     ^(.*)(\.(jpg|jpeg|gif|png|css|ico|xml|txt|pdf|js|ttf|woff))  -  [NC,L]

RewriteRule     ^(.*)$      handler.php [L,QSA]

apache log shows this:

[core:error] [pid 3032:tid 1136] [client 127.0.0.1:55367] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

1
Check your error.log and see what the error is for 500?anubhava
@anubhava I just added the error from the log to the original post. thanks!user2874270
What is a URL of your project? Local URLIvijan Stefan Stipić

1 Answers

0
votes

Try adding RewriteCond in your rules like this:

Options +FollowSymLinks     
RewriteEngine  On

RewriteCond %{REQUEST_URI} !\.(jpe?g|gif|png|css|ico|xml|txt|pdf|js|ttf|woff)$ [NC]    
RewriteRule !^handler\.php$ handler.php [L,NC]