I have a classifieds database which is displayed to users depending on their query, in a php file!
I'm currently struggling (and learning alot) with creating a xml site map. Also, users in the future doing the same thing will definetely find my posts and your help very useful as there is very little info about this out there (atleast that's what I have noticed).
My URL to a classifi开发者_如何学Goed is like this:
www.mysite.com/show_ad.php?id=bmw_m5_for_sale_48294938
I think this can be remade to this using mod_rewrite (correct me if I'm wrong)
www.mysite.com/bmw_m5_for_sale_48294938.htm
Now, what should I store in the xml site map file?
The 'REAL' url or the .htaccess url ?
I will update this Q if you need more input!
Thanks
I would store the url after using mod_rewrite, i would want the nice url's indexed by google and other search engines.
Store the nice (rewritten url) in the site map. It's easier on spiders and it's what the end user will see.
Definitely store the filename as rewritten. This will do better with search engines anyway, and that's one of the points of doing it, right?
You can generate your own sitemap too, fairly easily so you can use the database to generate all the filenames and put them in the XML.
Whatever you do, do not put both urls in the sitemap, you might get in trouble for duplicate content.
精彩评论