.htaccess 避免重定向到Laravel 4上的/index.php

.htaccess 避免重定向到Laravel 4上的/index.php,.htaccess,laravel-4,.htaccess,Laravel 4,我正在运行一个Laravel 4项目,当我在浏览器中点击www.mydomain.com时一切顺利,但当我点击mydomain.com时,我被重定向到www.mydomain.com/index.php 有人能帮我避免重定向到index.php吗 以下是我的.htaccess on public: <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteCond %{REQUE

我正在运行一个Laravel 4项目,当我在浏览器中点击www.mydomain.com时一切顺利,但当我点击mydomain.com时,我被重定向到www.mydomain.com/index.php

有人能帮我避免重定向到index.php吗

以下是我的.htaccess on public:

<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]

我的应用程序托管在fortrabbit.com上,我的域驻留在我的共享主机上,我在该主机上进行dns设置。如有必要,我将向您提供其他详细信息。谢谢大家!

在您的系统中的某个地方,有一条规则/代码执行
非www=>www
重定向。这条规则是在内部规则之上触发的。我认为这就是问题所在。谢谢!:)