2016-08-02 101 views
1

我希望每個人都做得很好,我需要幫助,我使用WordPress的最新版本,我需要爲我的網站定義我的主要默認域示例MyWordpressSite.com和所有停車域去MyWordpressSite。 com/LandingPage /以任何方式在一行中定義所有域並重定向到LandingPage?我不想在域名或其他選項中按域名定義域名?停車域重定向到登陸頁面WordPress的htaccess

感謝您的幫助!

問候 曼尼

回答

0

你需要一個消極模式,假設你在Apache:

RewriteEngine on 
#usually need next line though modify if WordPress is running in a subfolder 
RewriteBase/
RewriteCond %{HTTP_HOST} !^your\.domain\.tld$ 
RewriteRule^http://your.domain.tld/landing-page/ [L,R=301] 

任何要求非主域名將被永久重定向到該頁面。

+0

太棒了,非常感謝Walf – Manny