GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Anyone good with mod_rewrite? (https://gfy.com/showthread.php?t=64926)

AdultWire 06-19-2002 03:51 PM

Anyone good with mod_rewrite?
 
I'm trying to write an apache config that can be included in ANY virtual host configuration by using an include statement. For some reason, this doesn't work:

#RewriteEngine On

#RewriteCond %{HTTP_REFERER} !^$
#RewriteCond %{HTTP_REFERER} !^http://%{SERVER_NAME}.*$ [NC]
#RewriteRule ^.*\.(gif|jpg|swf|css|png|jpe|jpeg|js)$ http://www.theadultwire.com/someurl.html [NC,R]

Any ideas?

AdultWire 06-19-2002 03:52 PM

It should be noted, BTW, that it prevents *ALL* images from being downloaded, not just hotlinked images, BUT, if I hardcode a servername, it works just fine (but only for that domain).

Any help appreciated...

Pete 06-19-2002 04:00 PM

no

AdultWire 06-19-2002 05:44 PM

Really.. does no-one see anything wrong (other than the obvious fact that it's commented out?)

toddler 06-19-2002 05:55 PM

are you finding any errors in the error log?
apache's pretty good about bitching....

AdultWire 06-19-2002 08:01 PM

No.. I'll try running it again, but I'm pretty sure that it's not creating an error condition, it's just not doing what was expected.

toddler 06-19-2002 08:04 PM

Do other mod_rewrite rules work?

Look in /var/log/htttpd/error or whereever you have your stuff logging to. also may want to increase logging level, and restart apache...

shoot me mail if you liktie and we can look into this offline...

todd at zoomer.net

spanky 06-19-2002 09:51 PM

try using %{HTTP_HOST} instead of %{SERVER_NAME} if it's going in a VirtualHost container.

cheers

AdultWire 06-19-2002 11:19 PM

Thanks spanky.. I'll give that a try. I believe (unless I'm mistaken) that I started with HTTP_HOST, but I could have had something else wrong.

I'll let you know.

AdultWire 06-19-2002 11:42 PM

Well, no dice. No errors either (cause it seems to be a logical error, not syntactical).

I guess I"ll hack away at it overnight.


All times are GMT -7. The time now is 04:57 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123