Regex Htaccess重定向Laravel 4

Regex Htaccess重定向Laravel 4,regex,.htaccess,mod-rewrite,redirect,laravel-4,Regex,.htaccess,Mod Rewrite,Redirect,Laravel 4,我安装了Laravel 4,并使用样板文件的htaccess重定向我的站点: site.com.br至www.site.com.br(请注意www) 但是,当我使用诸如site.com.br/TITLE-OF-MY-POST之类的路由时,我会被重定向到: www.site.com.br/index.php而不是www.site.com.br/TITLE-of-MY-POST“ 有人知道为什么吗?以下是我的访问规则: 拉威尔法则 <IfModule mod_rewrite.c> Opt

我安装了Laravel 4,并使用样板文件的htaccess重定向我的站点:

site.com.br
www.site.com.br
(请注意www

但是,当我使用诸如
site.com.br/TITLE-OF-MY-POST
之类的路由时,我会被重定向到:

www.site.com.br/index.php
而不是
www.site.com.br/TITLE-of-MY-POST“

有人知道为什么吗?以下是我的访问规则:

拉威尔法则

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

选项-多视图
重新启动发动机
重写cond%{REQUEST_FILENAME}!-d
重写cond%{REQUEST_FILENAME}!-f
重写规则^index.php[L]
样板法则

<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

RewriteCond%{HTTPS}!=on
重写COND%{HTTP_HOST}!^www\..+$[NC]
重写规则^http://www.%{HTTP_HOST}%{REQUEST_URI}[R=301,L]

更改规则的顺序:

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

</IfModule>

选项-多视图
重新启动发动机
重写条件%{HTTPS}关闭
重写COND%{HTTP_HOST}!^www\[NC]
重写规则^http://www.%{HTTP_HOST}%{REQUEST_URI}[R=301,L,NE]
重写cond%{REQUEST_FILENAME}!-d
重写cond%{REQUEST_FILENAME}!-f
重写规则^index.php[L]
通常,在内部重写规则之前保留301规则