【发布时间】:2016-11-01 11:38:21
【问题描述】:
我希望我的网站 (www.bitumephotofest.it) 的根目录重定向到子域 (2016.bitumephotofest.it)(我正在运行 Wordpress 多站点)。有用。
但我有另一个子域 (2015.bitumephotofest.it),它也重定向到 2016.bitumephotofest.it。
我希望重定向仅在 www.bitumephotofest.it 和 2016.bitumephotofest.it 之间起作用。 2015.bitumephotofest.it应该是独立的,因为它是一个不同的网站。
我试图寻找有类似情况的人提出的问题,但总有一些不同的地方,无论如何,这些解决方案对我不起作用。
这是我的代码:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} 2016.bitumephotofest.it
RewriteCond %{REQUEST_URI} !wordpress/
RewriteRule ^(.*)$ /wordpress/$1 [L]
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteRule !^(2016) http://2016.bitumephotofest.it [L,R]
有人知道我错过了什么吗? 提前谢谢!
【问题讨论】:
标签: .htaccess redirect subdomain multisite