簡體   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