1
我在我的.htaccess文件中尝试此代码,但由于某种原因,当我在浏览器中尝试文件/1.html
时,它一次又一次地进入请求/1
的重定向循环。如何避免在.htaccess中重写和重定向循环
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [L]
RewriteBase/
RewriteCond %{REQUEST_URI} \.html$
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)\.html$ $1 [R=302,L]
我已经通过apache文档,只有得到的Apache可以重新启动处理重写规则在某些情况下。任何人都可以帮忙