DISQUS

Richard's Linux and E-learning blog: Writing dynamic XML sitemaps using PHP

  • Matthew Donadio · 1 year ago
    You can also have this appear at the normal URL with a simple rewrite:

    RewriteEngine on
    RewriteBase /
    RewriteRule sitemap.xml sitemap.php [L]
  • Richard Bradshaw · 1 year ago
    Good point - that's how I have it set up on my sites - probably should have mentioned that.

    Some sites automatically guess that it should be at /sitemap.xml, so I'd recommend doing this.
  • William · 10 months ago
    Well, that would be quite easier...
  • Webdesign Meppel · 1 year ago
    Nice article. Indeed a good way to set up your sitemap. You can use the Google webmaster tools to tell google about your sitemap. After that Google will keep downloading the sitemap again and again! Works very well... Allthough it should not be necessary for your site to be indexed completely...
  • About webdesign · 1 year ago
    Very nice. I will give it a try.
  • philfreelance-web · 1 year ago
    Great tutorial, and it works good, i also agreed with matthew by adding some htaccess rewrite rule in order it looks like an real xml file but it's dynamically php created.
  • Tony Ford · 10 months ago
    What an awesome trick! I'll give it a try. Thanks for putting it together. As a newbie to php, I find I work best with cheat sheets. Since I always have my iPhone with me, I keep them there. The best one I've found so far is from these guys:

    http://itunes.apple.com/WebObjects/MZStore.woa/...

    They also have great cheat sheets for CSS and Javascript. Hope this is helpful!
  • RoBiCser · 10 months ago
    thanks alot. this be useful for me .
  • Webdesign tilburg · 10 months ago
    Ah thanks a lot. We usually work with asp, so an easy php example was welcome. Just implemented it on a few websites and it works really fast and easy.
  • bh · 8 months ago
    thank you
  • daleclara · 2 months ago
    Web design

    If you have decided that you need a good website for your business,the next step is to decide who should create it.This decision is one that needs a lot of attention because if on the one hand, a well-organized and attractive web design can help you tremendously in making more money; on the other hand,a poorly designed website can cost you money, drive away customers, and can hurt your company reputation.
  • maxdoro · 2 weeks ago
    Thanks a lot, nice artikel

    greetz

    Tjeerd