htaccess的URL重定向仅HTTPS网址

问题描述:

我需要改变所有的HTTPS(仅HTTPS URL中,而不是http URL)的网址,如下所示:htaccess的URL重定向仅HTTPS网址

1)https://www.domain.com/login意味着https://www.domain.com/index.php?_route_=login

2)https://www.domain.com/account意味着https://www.domain.com/index.php?_route_=login

3)https://www.domain.com/aboutus表示https://www.domain.com/index.php?_route_=aboutus

我该如何做到这一点..? 我对.htaccess不是很熟悉。

请帮帮我。

+0

[这](http://htaccess-guide.com/)将帮助您熟悉的.htaccess –

RewriteEngine On 
RewriteCond %{HTTPS} ^on$ 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^([^/]+)/?$ /index.php?_route_=$1 [NC,L] 
+0

一旦我添加此代码在直播现场,我得到403 Forbidden错误。 请帮助我 –