English 中文(简体)
301 Redirect - Can 我与网页保持链接
原标题:301 Redirect - Can I maintain links to pages

我将造就现场。

我与整个网站的网页有着许多背链接。

我是否需要每条链接301条规则,或者我可以对整个地点有一条规则。

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^website.uk.com [nc]
rewriterule ^(.*)$ http://www.website.com/$1 [r=301,nc]

want to maintain: www.website.uk.com/page.html to www.website.com/page.html

not redirect: www.website.uk.com/page.html to www.website.com

Thanks Rob

最佳回答

这对我来说是可行的(我网站上有一条类似的规则,下文适用于你的领域):

RewriteCond %{HTTP_HOST} ^website.uk.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.website.uk.com [NC]
RewriteRule ^(.*)$ http://www.website.com/$1 [R=301,L]
问题回答

你们可以为整个网站制定一条规则。

页: 1 OR?

Options +FollowSymlinks
RewriteEngine on
Rewritecond %{http_host} ^website.uk.com [nc, OR]
Rewritecond %{http_host} ^www.website.uk.com [nc]
Rewriterule ^(.*)$ http://www.website.com/$1 [r=301,nc]




相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签