user2874270
user2874270

Reputation: 1382

htaccess throwing 500 server error

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.

Upvotes: 1

Views: 767

Answers (1)

anubhava
anubhava

Reputation: 785246

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]

Upvotes: 0

Related Questions