|
|
Can a sitemap file have different extension instead of .xml - Others
|
Views : 179
|
|
Tagged in : Others
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
Yes,it can have.
You can use every file name with your sitemap. Google accepts what you submit, 'sitemap.xml' is just a default. So you can go for 'sitemap.php', 'sitemap.asp', 'mysitemap.xhtml' or whatever scripting language you prefer, as long as the content is valid XML. However, there are good reasons to stick with the default 'sitemap.xml'.
Here is an example for Apache/PHP:
Configure your webserver to parse .xml files for PHP, e.g. by adding this statement to your root's .htaccess file:
AddType application/x-httpd-php .htm .xml .rss
Now you can use PHP in all .php, .htm, .xml and .rss files. http://www.yourdomain.com/sitemap.xml behaves like any other PHP script. Note: static XML files will produce a PHP error caused by the XML version header |
|
By Manigandan, On - 2011-09-16 |
|
|
|