任何人都可以帮我拿到Laravel php框架的默认.htaccess mod_rewrite文件转换为IIS6与IIRF isapi插件吗?
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”部分,而我尝试的其他所有内容都以某种方式失败。
答案 0 :(得分:2)
根据您的解释和评论后,这应该可以解决您的问题:
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]