0

i have added sitemap.xml file to my codeigniter project.

And i call it on my localhost like that : http://localhost/demo/sitemap.xml it runs without any issue.

But when i run it on live server http://example.com/demo/sitemap.xml it says 404 page not found.

What is issue ?

Manish Tiwari
  • 1,806
  • 10
  • 42
  • 65
  • Please check http://stackoverflow.com/questions/11792268/how-to-set-proper-codeigniter-base-url This helped me solve the similar problem. – Nagu Jun 27 '16 at 06:28
  • Maybe to exclude it from rewrite rule (I.E. `RewriteCond $1 !^(index\.php|sitemap\.xml|robots\.txt)`)? – Tpojka Jun 27 '16 at 23:26

1 Answers1

1

you need to add below things in your config/routes.php file

$route['sitemap\.xml'] = 'demo/sitemap'; // your navigation path i.e. your controller_name/function_name
Raj Jagani
  • 738
  • 1
  • 6
  • 21