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 ?

2
  • Please check stackoverflow.com/questions/11792268/… This helped me solve the similar problem. Commented Jun 27, 2016 at 6:28
  • Maybe to exclude it from rewrite rule (I.E. RewriteCond $1 !^(index\.php|sitemap\.xml|robots\.txt))? Commented Jun 27, 2016 at 23:26

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, what will code for that function can you explain me ?
sorry, I am not getting you.. what you want to know ?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.