Mod rewrite 301从子域重定向到URL
我正在尝试设置从子域到facebook页面的301重定向。我在下面使用它,并已将其上载到服务器上的根文件夹。我也试着把它上传到example.com/blog子文件夹,但是没有用Mod rewrite 301从子域重定向到URL,mod-rewrite,redirect,subdomain,Mod Rewrite,Redirect,Subdomain,我正在尝试设置从子域到facebook页面的301重定向。我在下面使用它,并已将其上载到服务器上的根文件夹。我也试着把它上传到example.com/blog子文件夹,但是没有用 RewriteEngine on RewriteCond %{HTTP_HOST} ^blog.example.co.uk RewriteRule ^(.*)$ http://www.facebook.com/example/$1 [R=301,L] #Deny access to h
RewriteEngine on
RewriteCond %{HTTP_HOST} ^blog.example.co.uk
RewriteRule ^(.*)$ http://www.facebook.com/example/$1 [R=301,L]
#Deny access to htaccess
Order Allow,Deny
Deny from all
有人知道为什么这不起作用吗
提前感谢,
灰烬
注:
我对此进行了进一步的研究,但忘了提到子域是在旧版本的Drupal上建立的。当我们设置任何子域时,这会导致站点失败
我们仍然可以导航到子域使用的文件夹,重定向在那里可以正常工作
因此,问题似乎在于drupal和子域,而不是重定向
谢谢,
Ash您遇到了什么样的错误 这段代码将拒绝访问所有内容,而不仅仅是.htaccess,就像它在注释中所说的那样
#Deny access to htaccess
Order Allow,Deny
Deny from all