sitemap.xml |
[eluser]mickeyboy[/eluser]
i need to upload a sitemap.xml file on a codeigniter website. to which directory should i upload it so that www.domain.com/sitemap.xml can be accessed? i tried saving this in the root directory and the controller folder but both doesn't work ![]()
[eluser]Popcorn[/eluser]
You upload it to the root web directory. Your server (if configured correctly) should serve static files without trouble.
[eluser]skunkbad[/eluser]
A better way to implement an xml sitemap would be to have a controller that checks the age of the files that make up the pages of your site, and output the XML. You would set a route to the controller for requests for the sitemap. By doing this, you never have to upload another sitemap because it is generated dynamically.
[eluser]mickeyboy[/eluser]
[quote author="mickeyboy" date="1265934280"]i need to upload a sitemap.xml file on a codeigniter website. to which directory should i upload it so that www.domain.com/sitemap.xml can be accessed? i tried saving this in the root directory and the controller folder but both doesn't work ![]() i tried uploading it to the root but it returns a 404 not found.
[eluser]luben[/eluser]
You have to tell your .htaccess file to return the sitemap.xml if it's requested: Code: RewriteEngine on Look at the last entry of RewriteCond $1: sitemap\.xml This condition tells the web server to return all things included in the list (brackets). If it's not included here, then by default is called the index.php file. That's why if sitemap.xml is not included, it cannot be opened.
[eluser]John_Betong[/eluser]
Beware: the Sitemap.xml name is case-sensitive: https://www.google.com/support/webmaster...6184&hl=en Quote:About Sitemaps Share Comment Print |
Welcome Guest, Not a member yet? Register Sign In |