![](/img/trans.png)
[英]Redirect all of the traffic to https://www. Currently I have two versions http://www and https://www
[英]Redirect traffic from www. to store.
我正在嘗試對.htaccess進行更改,以將形式為www.mysite.com/products/product_id
或www.mysite.com/items/item_id
流量重定向到store.mysite.com/products/product_id
或store.mysite.com/items/item_id
重定向
至
您可以使用以下規則:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?mysite\.com$
RewriteCond %{REQUEST_URI} ^/(products|items) [NC]
RewriteRule ^(.+)$ http://store.mysite.com/$1 [NC,L,QSA,R]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.