CodeIgniter Forums
Disapointed. Something going wrong with my routing - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Disapointed. Something going wrong with my routing (/showthread.php?tid=59720)



Disapointed. Something going wrong with my routing - El Forum - 11-08-2013

[eluser]Unknown[/eluser]
Hi guys,

I'm working on a huge project with CodeIgniter and I've a mysterious problem.

Facts :
I've 3 development environments. Development, Staging and Production.
I just developed a sitemap for my website (a sitemap with approximately 30000 sub-sitemaps).

My sitemap is based on a controller "Sitemap", routed like that :

Code:
$route['sitemap\.xml'] = 'sitemap/index';
$route['sitemap/main\.xml'] = 'sitemap/structure';
$route['sitemap/(:any)\.xml'] = 'sitemap/map/$1';

.htaccess on production :

Code:
Options +FollowSymLinks -Indexes
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f  
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|assets/|robots\.txt|([a-z0-9]+\.html))
RewriteRule ^(.*)$ index.php?/$1 [L]

All of my site runs perfectly on each environment.

BUT. In Development and in Staging, I do domain.com/sitemap.xml then, it works perfectly.
In production, domain.com/sitemap.xml doesn't work, but domain.com/index.php/sitemap.xml works.
When I request for domain.com/sitemap.xml, the default controller is called.

Note that my production server is on FastCGI.

Any idea ? Thank you.