Jump to content

Simple RewriteRule works on one production server, not on dev


sKunKbad

Recommended Posts

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".

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.