mod_rewrite
Edit: Apparently this is OT...
I am trying to use mod_rewrite to restrict access to resource directories. I cannot for the life of me get the rules to work the way I am seeing examples.
Here's what I am trying.
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://.*\.lordjester\.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*\.lordjester\.com/.*$ [NC]
RewriteRule .*\.(jpg|zip|doc|txt|phps|bmp|jpe|gif|rar|htm|html|mpg|avi|mov|qt|wmv)$ http://www\.lordjester\.com [R,NC]
However, it will not disallow direct access to the images in the images directory. I want only psges that are in one of those two domains to have access. Not even direct access if possible.
I was going to post this to
apache, but I see several other mod_rewrite inquiries that have gone unanswered.
Thanks in advance.
I am trying to use mod_rewrite to restrict access to resource directories. I cannot for the life of me get the rules to work the way I am seeing examples.
Here's what I am trying.
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://.*\.lordjester\.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*\.lordjester\.com/.*$ [NC]
RewriteRule .*\.(jpg|zip|doc|txt|phps|bmp|jpe|gif|rar|htm|html|mpg|avi|mov|qt|wmv)$ http://www\.lordjester\.com [R,NC]
However, it will not disallow direct access to the images in the images directory. I want only psges that are in one of those two domains to have access. Not even direct access if possible.
I was going to post this to
apache, but I see several other mod_rewrite inquiries that have gone unanswered.Thanks in advance.