Jump to content

Rewrite causes Sitemap Spider to Fail


unemployment

Recommended Posts

I am using this rewrite rule in my htaccess.    RewriteRule ^blog/([0-9]+)/.*$ /blog.php?post_id=$1 [L]

 

For some reason when I go to create a sitemap via http://www.xml-sitemaps.com/

 

It spiders pages that don't exist and keeps add pages to the url in the wrong way... for example...

 

mysite.com/blog/5/blog-title    is a real url

mysite.com/contact                  is a real url

mysite.com/blog/5/blog-title/contact    is NOT a real url

 

Is the rewriterule causing the issue?  I just want to make sure google's spiders don't have the same problem.

Link to comment
https://forums.phpfreaks.com/topic/245429-rewrite-causes-sitemap-spider-to-fail/
Share on other sites

While I do see a few relative links at the site you PMed me, none of them are for the contact page.

I think the spider may be "at fault", but I use the term loosely: it may be caching pages and it just hasn't refreshed since you've made changes (since I don't know when).

 

To answer the question, the URL rewriting shouldn't affect any of that so long as you use absolute URLs. Wait a day or two and try their sitemap thing again, see if the problem magically disappears.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.