문제

I have many category and product URLs coming from google which gives 404 errors. The reason is google has indexed most of the pages without .html (from old site) while now I have all the pages with .html suffix. Is there anyway, without creating thousands of Catalog URL Rewrites, I can check as per the below rules?

http://www.example.com/this-is-bad => http://www.example.com/this-is-bad.html
http://www.example.com/this-is-bad.html => standard 404 error page
http://www.example.com/this-is-good => nothing to do, CMS page, already working
http://www.example.com/this-is-good/ => nothing to do, already working
http://www.example.com/this-is-good.html => nothing to do, already working

So if you have noticed, I only want to redirect without-.html 404 link TO with-.html valid link. But also not to mess with working without-.html CMS pages.

Is it even possible with just .htaccess? Or how to approach this?

I'm using Enterprise 1.13 version on apache server, if this helps.

THANKS!

도움이 되었습니까?

해결책

Over time, the old pages will drop out of google's indexes and the new ones will be added. You could create a sitemap and submit it to google. That might make this process faster.

In the admin, go to Catalog/Google Site Map

Click Add Sitemap

Whatever file and path you choose must be writeable. Once you generate the sitemap, you can go to your Google webmasters account and give them the web path to the sitemap.

If you want to use rewrites, you would want to use the status code for "permanently moved". You should probably ask a rewrite question on stack overflow. It's a pretty general question and easily answered there.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top