Dynamic Sitemap

Discussion in 'PHP' started by jsamdirect, Jun 1, 2009.

  1. #1
    I built a php script that creates a dynamic sitemap for goolge. It works fine as far as google goes but I noticed that when I view it in my browser if does not display like it is an xml file. Instead it just prints to data minus the tags on the page.

    Basically, I have htaccess setup to rewrite sitemap.xml to sitemap.php. This allows my to have a dynamic map.

    you can see it here http://www.myhowtoarticles.com/sitemap.xml

    Any ideas why it does not display as an xml file?
     
    jsamdirect, Jun 1, 2009 IP
  2. Ralle

    Ralle Active Member

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #2
    you probably have to let php say
    header('Content-Type: text/xml');
    PHP:
     
    Ralle, Jun 1, 2009 IP
  3. jsamdirect

    jsamdirect Peon

    Messages:
    61
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That did it... Thanks!
     
    jsamdirect, Jun 1, 2009 IP