我最近在我的 CMS 中进行了更改,这导致谷歌网站管理员出现大量 404 错误。目前 404 未找到 URL 是
http://pukhtoogle.com/gallery/postcard.img707.htm
而工作 URL 是
http://pukhtoogle.com/gallery/img707.htm
我想通过 .htaccess 从 URL 中排除明信片,请建议一行来替换它,下面的代码显示了我现有的文件。
RewriteEngine On
#RewriteBase /
RewriteRule ^sitemap.xml$ google.php
RewriteRule ^cat-(.*)-([0-9]+)\.htm$ categories.php?cat_id=$2&%{QUERY_STRING}
RewriteRule ^cat\.htm$ categories.php?%{QUERY_STRING}
#Mod_bmollet : Image name in URL
RewriteRule ^img-(.*)-([0-9]+)\.htm$ details.php?image_id=$2&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.search.htm$ details.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.lightbox.htm$ details.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.htm$ details.php?image_id=$1&%{QUERY_STRING}
RewriteRule ^img([0-9]+)\.([a-zA-Z0-9]+)\.htm$ details.php?image_id=$1&mode=$2&% {QUERY_STRING}
#Mod_bmollet : This is to make search function work ( redirect links from search results )
RewriteRule ^search\.htm$ search.php?%{QUERY_STRING}
RewriteRule ^search\.([0-9]+)\.htm$ search.php?page=$1&%{QUERY_STRING}
RewriteRule ^lightbox\.htm$ lightbox.php?%{QUERY_STRING}
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}