raksmart活动促销

分享

写回答

发帖

下面的代码做301重定向怎么没作用啊?

国外虚拟主机 国外虚拟主机 1542 人阅读 | 2 人回复

发表于 2010-2-24 20:11:43 | 显示全部楼层 |阅读模式

  1. RewriteEngine on
  2. RewriteCond %{HTTP_HOST} ^xinmeiren.com$ [OR]
  3. RewriteCond %{HTTP_HOST} ^www.xinmeiren.com$
  4. RewriteRule ^(.*)$ "http\:\/\/www\.27u\.cn\/$1" [R=301,L]
复制代码
上面是代码,
我用的是linux 的vps空间

我想让xinmeiren.com 跳到 www.27u.cn上

然后把上面的代码保存上 .htaccess 上传到xinmeiren.com的根目录。怎么不起作用呢?

请各朋友看看哪里的问题?

回答|共 2 个

hellovps

发表于 2010-2-27 16:05:29 | 显示全部楼层

试试:
  1. RewriteEngine on
  2. RewriteCond %{HTTP_HOST} ^xinmeiren.com$ [OR]
  3. RewriteCond %{HTTP_HOST} ^www.xinmeiren.com$
  4. RewriteRule ^(.*)$ http://www.27u.cn/$1 [R=301,L]
复制代码

hellovps

发表于 2010-2-28 03:36:53 | 显示全部楼层

httpd.conf 里面的AllowOverride 打开没有?
RAKSmart
您需要登录后才可以回帖 登录 | 注册

本版积分规则