【发布时间】:2016-05-11 18:21:39
【问题描述】:
当我尝试从网址 www.mypage.com 进入我的网站时,我得到了类似http://www.mypage.com/index.php/https://mypage.com/https://www.mypage.com....
当我从 url mypage.com 输入时,我得到了https://mypage.com - 它没问题
当我从 url mypage.com/stuff 输入时,我得到了https://mypage.com/index.php/stuff(页面正在运行)
当我从网址 www.mypage.com/stuff 输入时,我得到了https://mypage.com/index.php/stuff
我该怎么办?我想总是有像https://mypage.com 这样的网址,没有index.php,也没有'www'。
我的 .htaccess :
AddHandler application/x-httpd-php70 php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
谢谢!
【问题讨论】: