LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache (mod_rewrite) question (https://www.linuxquestions.org/questions/linux-software-2/apache-mod_rewrite-question-65692/)

Wonko the Sane 06-15-2003 12:38 AM

Apache (mod_rewrite) question
 
I've been trying to cut down on hotlinking on my forum, and have been trying to get this to work in an .htaccess file, i know this should go into the httpd.conf file, but this isn't my webserver so i can't do that


here's what i've got

Quote:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?shinraonline\.com/.*$ [NC]
RewriteCond %{HTTP_FORWARDED} ^http://(www\.)?shinraonline\.com/board/attatchment\.php.*$ [NC]
RewriteRule ^http://(www\.)?shinraonline\.com/board/attatchment\.php.$ http://www\.shinraonline\.com/misc/klael\.jpg [R,L]
only it's not doing a thing, am I missing something stupid, or what's going on

thanks in advance

Rob

Qzukk 06-15-2003 12:55 PM

Not sure if this is directly related to your problem, but when doing something like this, keep in mind that some browsers and "anonymizers" can be configured to not report the referrer to your webbrowser. (this would be the !^$ case you check first... "if its not empty, then continue".) Set apache to log referrer information and check your logs to see if the system you are testing this from is reporting it or not.


All times are GMT -5. The time now is 03:22 PM.