[英]How to redirect domain and tail via htaccess
我想將我的網址(包含子域和尾部)重定向到異地鏈接,例如:
從order.mywebsite.com/location/
到非現場位置www.url.com
。
我有的:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^order.mywebsite.com/location/
RewriteRule http://www.url.com [R]
有人可以幫我嗎?
%{HTTP_HOST}字符串包含您的域名,不包含路徑。
變化:
RewriteCond %{HTTP_HOST} ^order.mywebsite.com/location
至
RewriteCond %{HTTP_HOST} ^order.mywebsite.com$
改寫
RewriteEngine on
RewriteCond %{HTTP_HOST} ^order.mywebsite.com$
RewriteRule ^location$ http://www.url.com [R,L]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.