Html 在内部重定向站点的最佳解决方案

Html 在内部重定向站点的最佳解决方案,html,web,seo,Html,Web,Seo,我有一个网站托管在一个商业供应商和所有网站上开发的/portal文件夹 直到今天,我仍然使用框架集重定向站点: <html> <head> <title>Titulo</title> <meta name="google-site-verification" content="xxx" /> <meta http-equiv="Content-Language" content="pt-br"> <meta name=

我有一个网站托管在一个商业供应商和所有网站上开发的/portal文件夹

直到今天,我仍然使用框架集重定向站点:

<html>
<head>
<title>Titulo</title>
<meta name="google-site-verification" content="xxx" />
<meta http-equiv="Content-Language" content="pt-br">
<meta name="description" content="xxxx">
</head>
<FRAMESET>
<FRAME SRC="http://www.test.com.br/portal" NORESIZE>
<body></body>
</FRAMESET>
</html>

提特罗
现在,主机提供商建议我使用:

<script>window.location='http://www.test.com.br/portal';</script>
window.location=http://www.test.com.br/portal';
这比框架集方法更快还是更好?
谷歌或其他搜索引擎将继续搜索内容吗?

只需将此标签添加到标题部分即可

<meta http-equiv="refresh" content="0; URL=http://www.test.com.br/portal"/>

只需将此标签添加到标题部分即可

<meta http-equiv="refresh" content="0; URL=http://www.test.com.br/portal"/>

您有不同的方法重定向到另一个页面。如果您使用的是像php一样的服务器端语言,您可以使用它(在发送标题之前):

使用HTML可以执行以下操作:

<meta http-equiv="refresh" content="0;url=http://www.test.com.br/portal">
<script>window.location='http://www.test.com.br/portal';</script>

使用Javascript可以执行以下操作:

<meta http-equiv="refresh" content="0;url=http://www.test.com.br/portal">
<script>window.location='http://www.test.com.br/portal';</script>
window.location=http://www.test.com.br/portal';

在我看来,最好的方法是第一种,因为您还可以指定重定向的类型(永久或临时),从SEO的角度来看,这是更好的。如果您选择第一种解决方案,谷歌和其他搜索引擎将能够轻松抓取您的页面。

您有不同的方法重定向到另一个页面。如果您使用的是像php一样的服务器端语言,您可以使用它(在发送标题之前):

使用HTML可以执行以下操作:

<meta http-equiv="refresh" content="0;url=http://www.test.com.br/portal">
<script>window.location='http://www.test.com.br/portal';</script>

使用Javascript可以执行以下操作:

<meta http-equiv="refresh" content="0;url=http://www.test.com.br/portal">
<script>window.location='http://www.test.com.br/portal';</script>
window.location=http://www.test.com.br/portal';

在我看来,最好的方法是第一种,因为您还可以指定重定向的类型(永久或临时),从SEO的角度来看,这是更好的。如果您选择第一种解决方案,谷歌和其他搜索引擎将能够轻松抓取您的页面。

出于某些原因,它比使用框架集更好

除了

<script>window.location='http://www.test.com.br/portal';</script>
window.location=http://www.test.com.br/portal';
您可以将指向该页面的链接放入HTML正文中,如下所示:

<p>You will now be redirected to another page.<br/>
If it didn't happen, use this link:
<a href="http://www.test.com.br/portal">http://www.test.com.br/portal</a></p>
您现在将被重定向到另一个页面。
如果没有发生,请使用以下链接:


但是使用php的头函数(Aurelio De Rosa的答案)的解决方案确实更好。

出于某些原因,它比使用框架集更好

除了

<script>window.location='http://www.test.com.br/portal';</script>
window.location=http://www.test.com.br/portal';
您可以将指向该页面的链接放入HTML正文中,如下所示:

<p>You will now be redirected to another page.<br/>
If it didn't happen, use this link:
<a href="http://www.test.com.br/portal">http://www.test.com.br/portal</a></p>
您现在将被重定向到另一个页面。
如果没有发生,请使用以下链接:


但是使用php的header函数(Aurelio De Rosa的答案)的解决方案确实更好。

您可以使用像php这样的服务器端语言吗?您可以配置HTTP守护进程来执行
30x
重定向。你甚至不再需要重定向页面了。我关心的是以最大的重定向速度进行。我知道使用服务器端语言会降低重定向的性能。我说得对吗?因为我使用的是主机提供程序,所以我没有访问apache配置的权限,所以我认为更改HTTP守护程序不是一个选项。您可以使用像PHP这样的服务器端语言吗?您可以将HTTP守护程序配置为执行
30x
重定向。你甚至不再需要重定向页面了。我关心的是以最大的重定向速度进行。我知道使用服务器端语言会降低重定向的性能。我说的对吗?因为我使用的是主机提供程序,所以我没有访问apache配置的权限,所以我认为更改HTTP守护程序不是一个选项。您能解释为什么这比框架集选项好吗?您能解释为什么这比框架集选项好吗?