【发布时间】:2014-03-11 05:26:36
【问题描述】:
当我尝试这个时
http://localhost/Testlaravel/public/users/login
它有效。但是当我尝试
http://localhost/Testlaravel/public/users/login/
它将我重定向到
http://localhost/users/login/
知道为什么吗?
这是我的 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>
【问题讨论】:
标签: php regex .htaccess mod-rewrite trailing-slash