Welcome Guest, Not a member yet? Register   Sign In
sitemap.xml
#1

[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 Sad please help.
#2

[eluser]Popcorn[/eluser]
You upload it to the root web directory. Your server (if configured correctly) should serve static files without trouble.
#3

[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.
#4

[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 Sad please help.[/quote]

i tried uploading it to the root but it returns a 404 not found.
#5

[eluser]luben[/eluser]
You have to tell your .htaccess file to return the sitemap.xml if it's requested:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|css|js|img|robots\.txt|sitemap\.xml)
RewriteRule ^(.*)$ /index.php/$1 [L]

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.
#6

[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
Sitemaps are a way to tell Google about pages on your site we might not otherwise discover. In its simplest terms, a XML Sitemap—usually called Sitemap, with a capital S—is a list of the pages on your website. Creating and submitting a Sitemap helps make sure that Google knows about all the pages on your site, including URLs that may not be discoverable by Google's normal crawling process.
 
 
 




Theme © iAndrew 2016 - Forum software by © MyBB