Page 1 of 1

mod_rewrite allow file access

Posted: Tue Jan 27, 2009 2:20 am
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?

Re: mod_rewrite allow file access

Posted: Thu Jan 29, 2009 2:29 am
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?

Re: mod_rewrite allow file access

Posted: Thu Jan 29, 2009 6:21 am
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.