[英]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. 我只是设置WAMP来开发一个新站点,并且当我添加一个.htaccess文件并将所有URL扔到我的url处理程序文件中时,出现500个服务器错误。 I'm guessing it's some kind of syntax error? 我猜这是某种语法错误? I do have the rewrite module enabled in apache. 我确实在apache中启用了重写模块。
here's the .htaccess file: 这是.htaccess文件:
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: apache日志显示以下内容:
[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. [core:error] [pid 3032:tid 1136] [client 127.0.0.1:55367] AH00124:由于可能的配置错误,请求超出了10个内部重定向的限制。 Use 'LimitInternalRecursion' to increase the limit if necessary. 必要时使用'LimitInternalRecursion'增加限制。 Use 'LogLevel debug' to get a backtrace. 使用“ LogLevel调试”获取回溯。
Try adding RewriteCond
in your rules like this: 尝试在您的规则中添加RewriteCond
,如下所示:
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]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.