使用的.htaccess我如何转发所有的页面完全相同的网页在不同的领域? [英] How can I forward ALL pages to the same exact page on a different domain using .htaccess?

查看:116
本文介绍了使用的.htaccess我如何转发所有的页面完全相同的网页在不同的领域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何做一个的 301重定向的网站上以完全相同的网页在不同的域使用的所有网页的的.htaccess

例如,前锋:

  www.currentdomain.com/page1.php
www.currentdomain.com/page2.php?p=1&t=75
www.currentdomain.com/archived/old/page100.php
 

要:

  www.newdomain.com/page1.php
www.newdomain.com/page2.php?p=1&t=75
www.newdomain.com/archived/old/page100.php
 

解决方案

据的 about.com的文章,以下应该都是流量重定向到一个新的领域:

  RewriteEngine叙述ON
重写规则^(。*)$ http://newdomain.com/$1 [R = 301,L]
 

How can I do a 301 redirect of ALL pages on a site to the same exact page on a different domain using .htaccess?

For example, forward:

www.currentdomain.com/page1.php    
www.currentdomain.com/page2.php?p=1&t=75       
www.currentdomain.com/archived/old/page100.php

To:

www.newdomain.com/page1.php    
www.newdomain.com/page2.php?p=1&t=75       
www.newdomain.com/archived/old/page100.php

解决方案

According to about.com's article, the following should redirect ALL traffic to a new domain:

RewriteEngine ON
RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]

这篇关于使用的.htaccess我如何转发所有的页面完全相同的网页在不同的领域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆