繁体   English   中英

htaccess网址仅重定向https网址

[英]Htaccess url redirect only https urls

我需要更改所有https(仅https网址,而不是http url)网址,如下所示:

1) https://www.domain.com/login表示https://www.domain.com/index.php?_route_=login

2) https://www.domain.com/accounthttps://www.domain.com/index.php?_route_=login

3) https://www.domain.com/aboutus是指https://www.domain.com/index.php?_route_=aboutus

我该如何实现..? 我对.htaccess不太熟悉。

请帮我。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM