Mobile app version of vmapp.org
Login or Join
Harper822

: After mod_rewrite the internal URLs are duplicated many times when crawling I'm sure it is my mistake in mod_rewrite rules, but I can't seem to figure it out. I've set up the rules for my

@Harper822

Posted in: #CanonicalUrl #Links #ModRewrite #UrlRewriting

I'm sure it is my mistake in mod_rewrite rules, but I can't seem to figure it out.
I've set up the rules for my new site and all works perfect, unless - I try to create a sitemap. The URLs get duplicated/triplicated/etc... pretty much ten URLs which open the same page.

Here are the rewrite rules:

RewriteRule sport/training/article/(.*)$ ./article.php?q=
RewriteRule sport/eating/article/(.*)$ ./article.php?q=
RewriteRule sport/track/article/(.*)$ ./article.php?q=

RewriteRule sport/training/(.*)$ ./list.php?l=1p=
RewriteRule sport/eating/(.*)$ ./list.php?l=2&p=
RewriteRule sport/track/(.*)$ ./list.php?l=3&p=


When my site gets crawled, the result is something like this:
www.blah.com/sport/training/article/article-about-sport http://www.blah.com/sport/training/sport/training/article/article-about-sport


Sometimes it is even like this:
www.blah.com/sport/training/sport/training/article/article/article-about-sport

All of the above open the correct page BTW.

Internal generated link structure design seems to be ok.
What am I missing here?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Harper822

1 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

I just figured it out. It actually turns out to be a mistake in URL generation. It was an idea about "crawler sees what it sees" that helped me to solve this.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme