Web Hosting Talk







View Full Version : Rewrite rules crash Apache


grsites
08-11-2001, 10:39 AM
When I put some rewrite rules in srm.conf such as:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^.*domain.com.*$ [NC]
RewriteRule .*\.jpg$ - [F,NC]


Everything works fine, but when I restrict it to a directory, i.e.


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^.*domain.com.*$ [NC]
RewriteRule .*\.jpg$ - [F,NC]



it crashes Apache. The Raq is fine, but the web server doesn't even load.

Any ideas? Thanks in advance...

Eagle
08-11-2001, 10:47 AM
Make a .htaccess with

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^.*domain.com.*$ [NC]
RewriteRule .*\.jpg$ - [F,NC]

and put it in /home/sites/home/web/directory