htaccess Sitemap.xml - 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: htaccess Sitemap.xml (/showthread.php?tid=51135) |
htaccess Sitemap.xml - El Forum - 04-22-2012 [eluser]Unknown[/eluser] Helo I have writed a function to generate a sitemap.xml. the function is in /main/sitemap I have a classic .htaccess like: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ index.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> I modify like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^Sitemap\.xml$ index.php?/main/sitemap [L] RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ index.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> when I call "http://mysite.com/index.php?/main/sitemap" or "http://mysite.com/main/sitemap" it is good but "http://mysite.com/Sitemap.xml" return an Error 404 Where is the error in my .htaccess Thank you |