Dynamic Google Sitemap for Blogger and Gallery
I usually don’t post programming things here, but this is related to my site…
Google has a Sitemaps service which allows webmasters (like myself) to tell Google where the pages on my site are. However, because my site is dynamic (meaning, it changes frequently), I would need to update this file each time I update my site.
But using PHP, I can dynamically create my site. The script reads my Blogger (html) files and even posts links to Gallery.
Get the source for my Dynamic Google Sitemap for Blogger and Gallery
See it in action here. So how did I get the xml extension on a php file? A simple little .htaccess trick:
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap.xml$ sitemap.php [QSA]
Hopefully now Google will fix the listings in their index that go to my site – they’re still going to my old site, which is probably pointing people in the wrong direction



Hey that’s a life saver. I will try this on my blogger.
Thanks:-)