假設我有domain.com
和addon.com
。我的託管服務提供商是Bluehost。 domain.com
是主域(託管在public_html
),而addon.com
是附加域(託管在public_html/addon
)。我想提出以下重定向:URL重寫:插件域,子域和目錄
http://domain.com/addon/*
→http://addon.com/*
http://addon.domain.com/*
→http://addon.com/*
僅供參考,既public_html/.htaccess
和public_html/addon/.htaccess
有工作規則去除www
前綴:
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301]
我該如何着手添加其他重定向,並且這些重定向可以很好地適應這些規則?
刪除我的答案是由於更新問題。 – Wood