我需要更改所有https(仅限https网址,而非http网址)网址,如下所示:
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 :(得分:0)
RewriteEngine On
RewriteCond %{HTTPS} ^on$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ /index.php?_route_=$1 [NC,L]