[英]301 Redirect not working from Google results link
我的htaccess 301重定向工作,如果我键入网址时不带斜杠,例如...
www.nicksplumbing.com/water-heater
如果我使用斜线结尾...
www.nicksplumbing.com/water-heater/
重定向在新页面网址(如.html /)后添加尾部斜杠,导致404。
这对我来说是一个严重的问题,因为旧的Google搜索结果以斜线结尾,并且正在404处理且未重定向。
这是我的htaccess:
选项+ FollowSymLinks
RewriteEngine开
ErrorDocument 404 http://www.nicksplumbing.com/404.html
RewriteCond %{HTTP_HOST} ^nicksplumbingrepair.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.nicksplumbingrepair.com$ [OR]
RewriteCond %{HTTP_HOST} ^nicksplumbing.com
RewriteRule ^(.*)$ http://www.nicksplumbing.com/$1 [L,R=301,NC]
Redirect 301 /plumbing-company-houston http://www.nicksplumbing.com/plumbers-in-houston.html
Redirect 301 /reviews http://www.nicksplumbing.com/houston-plumbing-company-reviews.html
Redirect 301 /leaky-faucet http://www.nicksplumbing.com/leaky-dripping-faucet-repair-houston.html
Redirect 301 /garbage-disposal http://www.nicksplumbing.com/garbage-disposal-repair-installation-houston.html
Redirect 301 /plumbing-repair http://www.nicksplumbing.com/plumbing-services-houston.html
Redirect 301 /repipe http://www.nicksplumbing.com/repipe-house-specialists-houston.html
Redirect 301 /sewer-repair http://www.nicksplumbing.com/sewer-line-repair-houston.html
Redirect 301 /toilet-clogged http://www.nicksplumbing.com/running-leaking-toilet-repair-houston.html
Redirect 301 /water-heater http://www.nicksplumbing.com/water-heater-repair-installation-houston.html
Redirect 301 /blog http://www.nicksplumbing.com/nicks-plumbing-blog.html
Redirect 301 /contact-us http://www.nicksplumbing.com/contacts.html
有人可以帮忙吗? 急于找到原因,因为我不想失去任何链接。
提前致谢!!!
需要将目录重定向到HTML。
RedirectMatch 301 ^ / water-heater(。*) http://www.nicksplumbing.com/water-heater-repair-installation-houston.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.