谁能帮我获得使用IIRF isapi插件为IIS6转换的Laravel php框架默认.htaccess mod_rewrite文件吗?
Laravel默认.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
IIRF似乎不喜欢简单的“ ^ index.php”部分,而我尝试过的其他一切都以某种方式失败。
根据您的解释和评论,这应该可以解决您的问题:
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^/?(.+)/$ /$1 [R=301,L]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ /index.php [L]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句