如何建立到旧页面的链接转到新页面而不显示任何内容 [英] how to make a link to an old page go to a new page without displaying anything

查看:91
本文介绍了如何建立到旧页面的链接转到新页面而不显示任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个广泛分发的旧链接。我现在想要

在旧的

页面上放置一个链接,该页面将转到新页面而不显示任何内容。

I have an old link that was widely distributed. I would now like to
put a link on that old
page that will go to a new page without displaying anything.

推荐答案

2007年8月20日星期一09:08:51 +0200,< te*@shapin.orgwrote:
On Mon, 20 Aug 2007 09:08:51 +0200, <te*@shapin.orgwrote:

我有一个广泛分发的旧链接。我现在想

在旧的

页面上放置一个链接,该页面将转到新页面而不显示任何内容。
I have an old link that was widely distributed. I would now like to
put a link on that old
page that will go to a new page without displaying anything.



假设你的旧链接已弃用,不应再使用(即

人们应该更新他们的书签及其与新目标的链接),

你应该使用301 Moved永久HTTP重定向。


请参阅:
http://www.ietf.org/rfc/rfc2616.txt
http://www.w3.org/DesignIssues/UserAgent.html


请不要使用http-equiv =刷新元,它打破后面

按钮。
http://www.w3.org/QA/Tips/reback

如果你的内容管理系统很好,你应该能够设置

301重定向。
http://www.w3.org/TR/chips/#gl2


如果您使用A pache服务器:
http:// www .mcanerin.com / EN / articles / ... ect-apache.asp


只需添加一个Redirect 301 /old/old.html http://域/新/ new.html" 。

..htaccess文件。


如果您使用ASP服务器,PHP,CGI脚本或ColdFusion,它应该是

也很简单:
http://www.somacon.com/ p145.php

其他一些人在:
http://www.webconfs.com/how-to-redirect-a-webpage.php


如果你仍然没有在那里找到你的管理系统,那么,使用谷歌:
http://www.google.com/search?hl=en&l...P+301+redirect


如果谷歌没有帮助,请联系负责您内容的权限

管理系统。


注意:为你的URI选择一个好的方案,这样他们就不太可能改变:b / b http://www.w3.org/Provider/Style/URI


我希望它有所帮助。

-

您可以通过< ta ******** @ yahoo.fr>联系我

Assuming your "old" link is deprecated and shouldn''t be used anymore (i.e.
people ought to update their bookmarks and their links to the new target),
you should use a 301 Moved Permanently HTTP redirect.

See:
http://www.ietf.org/rfc/rfc2616.txt
http://www.w3.org/DesignIssues/UserAgent.html

Please, do not use the http-equiv=refresh meta, it "breaks the back
button".
http://www.w3.org/QA/Tips/reback

If your content management system is good, you should be able to setup a
301 redirection.
http://www.w3.org/TR/chips/#gl2

If you use an Apache server:
http://www.mcanerin.com/EN/articles/...ect-apache.asp

Simply add a "Redirect 301 /old/old.html http://domain/new/new.html" line
in a .htaccess file.

If you use an ASP server, PHP, a CGI script or ColdFusion, it should be
easy too:
http://www.somacon.com/p145.php
A few others at:
http://www.webconfs.com/how-to-redirect-a-webpage.php

If you still don''t find your management system there, then, use google:
http://www.google.com/search?hl=en&l...P+301+redirect

If google doesn''t help, contact the authority responsible of your content
mangement system.

Note: Choose a good scheme for your URI, so that they''re not likely to
change:
http://www.w3.org/Provider/Style/URI

I hope it helps.
--
You can contact me at <ta********@yahoo.fr>


2007年8月20日上午12:08, te*@shapin.org 写道:
On 8/20/2007 12:08 AM, te*@shapin.org wrote:

我有一个广泛分布的旧链接。我现在想

在旧的

页面上放置一个链接,该页面将转到新页面而不显示任何内容。
I have an old link that was widely distributed. I would now like to
put a link on that old
page that will go to a new page without displaying anything.



实际上你应该显示一个警告页面。这样,拥有

设置书签(在IE中,收藏夹)或在自己的网站上有链接的访客可以更新它们。


我通常用警告页面替换旧页面大约3个月。

警告页面告诉用户URI已经改变并给出了

新URI作为链接。如果用户已经打瞌睡或者去了一个

小吃,我不会使用REFRESH从警告页面到达新页面。


As另外,您可以设置软链接。在您的Web服务器上。这个

导致对旧文件路径的任何引用成为对

新文件路径的引用。为此,您必须在服务器上拥有一个shell帐户,以便您可以建立一个Telnet或类似会话。


在以前用于保存的目录中旧文件,执行命令:

ln -s newfilepath oldfile

where" newfilepath"是新文件的名称和位置相对于旧文件的目录和oldfile而言是

是旧文件的完整名称(扩展名为

)。因此,如果我有一个旧页面

< http://www.rossde.com/foo/work.htmland将其替换为

< http:// www.rossde.com/bar/fun.html> ;,该命令将在/ f
/ foo目录中执行,并且将是

ln -s ../bar/ fun.html work.html

请注意,我仅将此用于URI的临时更改,因为我希望

用户能够更新其书签。我也使用它来改变图形文件并且不想更新

引用它的所有HTML文件(例如,用一个替换PNG文件GIF文件)。

-

David E. Ross

< http://www.rossde.com/>


天然食物可能有害:看看所有死于自然原因的人b / b $

Actually you should display a warning page. That way, visitors who have
set bookmarks (in IE, "favorites") or who have links in their own Web
pages can update them.

I generally replace the old page with a warning page for about 3 months.
The warning page tells the user that the URI has changed and gives the
new URI as a link. In case the user has dozed off or gone to get a
snack, I do not use REFRESH to reach the new page from the warning page.

As an alternative, you can set a "soft-link" on your Web server. This
causes any reference to the old file-path to become a reference to the
new file path. For this, you must have a shell account on your sever so
that you can establish a Telnet or similar session.

In the directory that used to hold the old file, execute the command:
ln -s newfilepath oldfile
where "newfilepath" is the name and location of the new file relative to
the old file''s directory and "oldfile" is the complete name (with
extension) of the old file. Thus, if I had an old page
<http://www.rossde.com/foo/work.htmland replaced it with
<http://www.rossde.com/bar/fun.html>, the command would be executed in
the /foo directory and would be
ln -s ../bar/fun.html work.html
Note that I use this only for temporary changes in URIs because I want
users to be able to update their bookmarks. I also use it where I
changed a graphic file and don''t want to update all the HTML files that
reference it (e.g., replacing a PNG file with a GIF file).
--
David E. Ross
<http://www.rossde.com/>

Natural foods can be harmful: Look at all the
people who die of natural causes.


Scripsit David E. Ross:
Scripsit David E. Ross:

2007年8月20日上午12:08, te * @ shapin.org 写道:

>我有一个广泛分布的旧链接。我现在想在那个旧的页面上放一个链接,它将转到一个新的页面而不显示任何内容。
>I have an old link that was widely distributed. I would now like to
put a link on that old
page that will go to a new page without displaying anything.



实际上你应该显示一个警告页面。


Actually you should display a warning page.



很难。听起来像泼溅页面。它是。

Hardly. Sounds like splash page. And it is.


这样,

的访问者设置了书签(在IE中,收藏夹)或者有链接的人他们的

自己的网页可以更新它们。
That way, visitors who
have set bookmarks (in IE, "favorites") or who have links in their
own Web pages can update them.



有多少人关心这类事情?大多数人只想看到

的内容。


如果你关心这些问题,你应该在实际页面中加入一个注释

内容,在其新地址中。类似于此页面现在(因为[插入

数据])位于新地址。您可以考虑在

中更新它的书签(收藏夹)。但即使这有点天真。

How many people care about such things? Most people just want to see the
content.

If you care about such issues, you should include a note in the actual page
content, in its new address. Something like "This page now (since [insert
data]) resides at a new address. You may wish to consider updating it in
your bookmarks (favorites)." But even that is a bit naive.


我通常用一个警告页面替换旧页面大约3

个月。
I generally replace the old page with a warning page for about 3
months.



如果你这样做,搜索引擎会看到页面内容从根本上改变了b $ b,现在变得很小。他们会做什么?好吧,他们_may_检查

链接,并考虑将链接页面编入索引,作为新页面。或者如果他们做了一些启发式的话,可能作为旧页面的新

地址,但是他们会吗?


相反,如果你使用HTTP重定向,那么在一个非常好的回复中描述

在这里,搜索引擎会通知地址已经改变并相应地行动




- -

Jukka K. Korpela(Yucca)
http://www.cs.tut.fi/~jkorpela/

If you do that, search engines will see that the page content has radically
changed and is now minimal. What will they do? Well, they _may_ check the
link and consider indexing the linked page, as a new page. Or maybe as a new
address for an old page if they do some heuristics, but will they?

Instead, if you use HTTP redirect, as already described in a very good reply
here, search engines will notify that the address has changed and act
accordingly.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


这篇关于如何建立到旧页面的链接转到新页面而不显示任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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