mod_rewrite allow file access

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

mod_rewrite allow file access

Post by shiznatix »

I have a sitemap called web_sitemap_bf241ccb_000.xml.gz on my server and I want all .xml.gz files to be access as just the files they are, so basically just skip the mod_rewrite rules and display the files (or prompt for download).

For some reason I am having massive troubles with this. I have tried adding .xml.gz to the "skip bootstrap file" line like this:

Code: Select all

RewriteRule !\.(js|ico|gif|jpg|png|css|php|bmp|txt|xml|html|gz|pdf|pl|swf|xml.gz)$ index.php
but no dice.

I also tried doing:

Code: Select all

RewriteRule ^web_sitemap_bf241ccb_000.xml.gz$ web_sitemap_bf241ccb_000.xml.gz [L]
again, no dice.

Basically those are my 2 relevant lines in my .htaccess file. Can anyone give me a bit of help?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Re: mod_rewrite allow file access

Post by shiznatix »

*bump*

to clarify, I basically redirect everything to my index.php file and use that as my bootstrap but I want to have specific files be allowed to be downloaded and not put to the index.php file. How do I go about this?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Re: mod_rewrite allow file access

Post by shiznatix »

:banghead: stupid file permissions. Instead of saying "forbidden" which would have helped it just went to my 404 page. arg arg arg. Fixed now.
Post Reply