通过301重定向404误差的.htaccess的搜索引擎优化等(Redirecting 404 error with .htaccess via 301 for SEO etc)

   IT问题网   2018-07-23 00:00:00

问 题

我找不到直接回答我的问题,需要从真正的专家知道这一点。

我这是是joomla生成的url一个网站。我相信万吨网址都是围绕在搜索引擎,我真的不知道这这一切。 302重定向将是一种选择,但我不能说这需要的url重定向。

我知道,所有的url都被sef404脚本生成的唯一的事情,它是为joomla搜索引擎优化脚本。

我的问题,我怎么能确保所有的谷歌和其他搜索引擎的孤儿的网址是否正确使用.htaccess文件交付?

我如何301重定向所有的404页主页(根文件)

目前,我使用自定义404.html错误文件,但也有太多的文件,并给了自定义404错误页面过山车

解决方案

您需要了解一些有关的url,比如他们有一个特定目录或某些查询字符串元素,因为你必须匹配的东西。否则,你将不得不重新定向的404如果这是需要什么然后做这样的事情在你的.htaccess:

 的errordocument 404的index.php
 

所以你不能使用www.mydomain.com一个错误页面重定向必须是相对于根。

如果你有一个模式来匹配太然后用301代替302,因为301是永久性的,302是暂时的。一个301将会从搜索引擎中删除旧的url和302不会。

现代重写参考:<一href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

标签:通过定向误差搜索引擎优化



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

而不进行任何验证的IP地址(Allow IP address without authentication)

problem i have set up a site that is currently work in pr ...

HTTP的当量=英寸×UA兼容&QUOT;内容=IE =边缘,镀铬= 1......在.htaccess把这个?(http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge,chrome=1&quot; ... Putting this in .htaccess)

problem i downloaded html5 boilerplate and it wouldnt val ...

如何使用mod_headers中和mod_expires缓存(how to use mod_headers and mod_expires to cache)

problem i want to cache images and other files on my site ...

如何从一个子目录中删除的.htaccess密码保护(How to remove .htaccess password protection from a subdirectory)

problem i have password protected my entire website using ...

请.git目录网站无法访问(Make .git directory web inaccessible)

problem i have a website that i use github (closed source ...

重写URL以htaccess的(rewrite url with htaccess)

problem first of all i am a beginner so please answer in ...

重写QUOT&; pretty的网址&QUOT;?(Rewrite to &quot;pretty URL&quot;)

problem this is an example of what i am trying to achieve ...

需要mod_rewrite的URL信息(mod_rewrite URL info required)

problem i am new to this mod_rewrite. i have been success ...

的.htaccess,迫使斜线和www(.htaccess, forcing a slash and www)

problem can someone please help me to force my website to ...

简单的301重定向在.htaccess与查询字符串不以重定向指令工作(Simple 301 redirect in .htaccess with query string does not work with Redirect directive)

problem i am trying to redirect a single url in a .htacce ...

如何将文本转换使用的.htaccess为小写的网址(How to convert text to lowercase URLs using .htaccess)

problem i want to set up 301 redirects in my .htaccess fi ...

&QUOT;双向&QUOT;改写(&quot;Two Way&quot; Rewrite)

problem so, i'm trying to accomplish this: we have a url ...

与字preSS除非使用URL重写不工作[R](Url rewriting not working with wordpress unless using [R])

problem i have a wordpress installation on my website on ...

通过htaccess的重定向所有的HTTP和HTTPS非www网址https://www.xyz.com(Redirect all http AND https non-www URLS to https://www.xyz.com via htaccess)

problem for reasons much too long and complex to get into ...

重定向的* .htm为* .PHP(Redirect *.htm to *.php)

problem i am trying find out how to redirect all traffic ...

HTTPS重定向到非www和http到www(Redirect https to non-www and http to www)

problem i searched and found hundreds of related cases, b ...

如何从URL使用htaccess的本地主机和主机服务器删除“/公众”?(how can remove &#39;/public&#39; from url using htaccess for localhost and host server)

problem i'm using zend framework 2 on xampp. i created .h ...

的.htaccess重写规则到路径不改变网址(.htaccess RewriteRule to path without changing URL)

problem so, i've this problem: base website located at ...

我怎样才能mod_rewrite的,并保持查询字符串?(How can I mod_rewrite and keep query strings)

problem i want to mod_rewrite a url to another page, but ...

如何从PHP脚本改变外观的URL(How to change appearance of URL from within a PHP script)

problem i have some php and html in the same file, and i ...