Php .htaccess生成的循环为消息ERR\u提供了太多的重定向
我正在使用.htaccess来获得更干净的URL。我的.htaccess如下所示:Php .htaccess生成的循环为消息ERR\u提供了太多的重定向,php,.htaccess,Php,.htaccess,我正在使用.htaccess来获得更干净的URL。我的.htaccess如下所示: RewriteEngine On RewriteBase / RewriteRule SmartMenu SmartMenuPrototype/dashboard [NC,L] 浏览器给了我ERR_TOO_MANY_重定向消息。在apache2错误日志文件中,我收到以下消息: Request exceeded the limit of 10 internal redirects due to probable
RewriteEngine On
RewriteBase /
RewriteRule SmartMenu SmartMenuPrototype/dashboard [NC,L]
浏览器给了我ERR_TOO_MANY_重定向消息。在apache2错误日志文件中,我收到以下消息:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. etc..
我想我是在以某种方式创建一个循环,但我对语法不太熟悉。您需要在正则表达式中使用锚点:
RewriteEngine On
RewriteBase /
RewriteRule ^SmartMenu/?$ SmartMenuPrototype/dashboard [NC,L]
否则,SmartMenu
也将匹配SmartMenuPrototype