我有两个进入 404 页面的入站链接,因为这些链接很松散。我已尝试正常对这些链接进行 301 处理,但没有成功,我相信是因为此外部 URL 使用的字符。
Column<u>Radiators.html
是此外部网站上建议的页面,并且
Column_Radiators.html
是实际页面。
还有
Bath%3Cu%3EFiller.html
在外部网站上以及
Bath_Filler.html
在我们的实际网站上。
如何成功重定向这些页面?
最佳答案
只需在 .htaccess 中添加这些行
redirect 301 /Column<u>Radiators.html /index.html
redirect 301 /Bath<u>Filler.html /index.html
注意:我使用index.html作为默认重定向,但您可以使用自定义404。
关于.htaccess - 使用 .htaccess 重定向来自外部站点的错误 URL 链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7567152/