Forum Moderators: phranque

Message Too Old, No Replies

.htaccess

         

zr1skydiver

3:05 pm on Aug 29, 2011 (gmt 0)

10+ Year Member



I have a simple request that I cannot figure out. I need to redirect everything to index.php which I accomplished with the following

RewriteEngine On
RewriteCond %{REQUEST_URI} !=/index.php
RewriteRule .* /index.php

The only exception would be images. The are all in a folder called images. So in other words anything /images/* goes to that folder.

Thanks in advance for any help.

lucy24

3:58 pm on Aug 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



RewriteCond %{REQUEST_URI} !/images

or, alternately,

RewriteCond %{REQUEST_URI} !\.(jpe?g|gif|png)$ [NC]

There are other ways to do it; those are just the first that came to mind. Both should grab any image, anywhere.