【发布时间】:2018-01-10 23:00:59
【问题描述】:
我已经尝试了所有可能的配置,但我无法使其正常工作。 我知道这个话题已经出现了很多次,但我无法为我的案例找到正确的解决方案,尽管它应该很简单。
访问www.example.fr 时,一切正常,我被重定向到https://www.example.fr。
现在,如果我访问example.fr,那么我会被重定向到https://www.example.fr/index.php。
我还刚刚注意到,如果我访问https://www.example.com(同一个域,属于我的不同扩展名),我会被重定向到@987654324 @
这是我的 .htaccess
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /web/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php [L,QSA]
RewriteCond %{HTTP_HOST} ^example.fr [NC]
RewriteRule ^(.*)$ http://www.example.fr/$1 [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
我想永远摆脱那个/index.php。
任何帮助将不胜感激!
【问题讨论】:
标签: .htaccess mod-rewrite