|
Posted by Greg Donald on 05/05/05 16:05
On 5/5/05, Mathieu Dumoulin <mdumoulin@groupimage.com> wrote:
> We have here at work a simple .htaccess that redirects all requests to
> an index page which works fine so far. I'll show you the code of the
> .htaccess you can use it if you can't to, it works perfectly fine.
>
> AddType application/x-httpd-php .html
> RewriteEngine on
> RewriteBase /
> RewriteRule ^$ - [QSA,L]
> RewriteRule ^.*\.gif$ - [L]
> RewriteRule ^.*\.jpg$ - [L]
> RewriteRule ^.*\.css$ - [L]
> RewriteRule ^.*\.png$ - [L]
> RewriteRule ^.*\.exe$ - [L]
> RewriteRule ^(.*)/$ index.html?virtual_path=$1 [QSA,L]
> RewriteRule ^(.*)$ index.html?virtual_path=$1 [QSA,L]
> RewriteRule ^(.*)/index.html$ index.html?virtual_path=$1 [QSA,L]
>
> The major problem i have with this, is that we have a folder called
> /media and i want everything inside this folder to be [L] left alone.
> Right you can see we managed to do this using different extension but i
> got a dynamic module that allows people to upload/download pretty much
> anything from the media folder, so eventually some files are not of
> correcte extension and i get problems regarding a page that doesn't
> really exist in my engine or i just open the DB connection for nothing
> for instance.
>
> I really suck a Regexp so i was wondering if people could help me find
> the exact regexp that will make everything in the /media dir completly
> [L] appart. I tried several things but doesn't work.
Put an .htaccess file in the media/ directory that says RewriteEngine off.
--
Greg Donald
Zend Certified Engineer
http://destiney.com/
[Back to original message]
|