sKunKbad Posted February 24, 2014 Share Posted February 24, 2014 mod_rewrite is for sure enabled on both servers, but the following script doesn't work on dev. Instead it rewrites to sitemap (no file extension), which results in a 404. Any idea what's up? RewriteEngine On RewriteBase / RewriteRule ^sitemap\.xml$ sitemap.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php/$0 [PT,L] I just need to generate the sitemap via the sitemap.php script. What's weird is that I can't even call the script directly. Requests for sitemap.xml and sitemap.php are both routed to "sitemap". Quote Link to comment https://forums.phpfreaks.com/topic/286466-simple-rewriterule-works-on-one-production-server-not-on-dev/ Share on other sites More sharing options...
Ch0cu3r Posted February 24, 2014 Share Posted February 24, 2014 You may have a setting called MultiViews enabled on your dev-sever. Does adding Options -MultiViews To the top of .htaccess help? Quote Link to comment https://forums.phpfreaks.com/topic/286466-simple-rewriterule-works-on-one-production-server-not-on-dev/#findComment-1470389 Share on other sites More sharing options...
sKunKbad Posted February 24, 2014 Author Share Posted February 24, 2014 (edited) I didn't try that (and don't know what it is without reading/searching), but the problem was that there was an .htaccess in a parent directory with a conflicting rewrite rule. EDIT -- Thanks for your reply! I appreciate your time. Edited February 24, 2014 by sKunKbad Quote Link to comment https://forums.phpfreaks.com/topic/286466-simple-rewriterule-works-on-one-production-server-not-on-dev/#findComment-1470410 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.