News:

Wondering if this will always be free?  See why free is better.

Main Menu

.htaccess Issue

Started by dtm.exe, June 19, 2005, 02:19:37 AM

Previous topic - Next topic

dtm.exe

I have placed my .htaccess file with the following code in the root directory of my forums.  I've even tried restarting, but I still can't get hotlinking disabled...

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?oi-forums.com(/)?.*$     [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|png)$ http://img29.echo.cx/img29/9256/hl9se6vk.gif [R,NC]


What am I doing wrong?

-Dan The Man

[Unknown]

Try pressing Ctrl-F5.  You may have the hotlinked graphics cached.

-[Unknown]

Amacythe

#2
heh, I said the same thing

He's been testing it in the test board
http://www.simplemachines.org/community/index.php?topic=39279

dtm.exe

Quote from: [Unknown] on June 19, 2005, 05:57:27 AM
Try pressing Ctrl-F5.  You may have the hotlinked graphics cached.

-[Unknown]

Tried that...no luck.

-Dan The Man

Tristan Perry

Try:



RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?oi-forums.com(/)?.*$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://oi-forums.com/hl9se6vk.gif [R,NC]


You'll have to upload the no hotlinking image to your forums. The problem you were probably having was that the re-direction "ho hotlinking" image is blocked and so this won't work. Also the re-direction image can't be the same as one of the file-types (.gif is blocked, hence "hl9se6vk.gif" won't work")

So to fix the error: Upload the no-hotlinking image to your forums, and also instead of making it .gif, make it ".jpe".

mediman

.htaccess

Options -Indexes +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?oi-forums.com(/.*)?$ [NC]
RewriteRule \.(gif|jpg|GIF|JPG|php)$ http://oi-forums.com/hl9se6vk.gif [R,L]
</IfModule>


also important

in httpd.conf you need

<Directory path_to_the_protectet_dir>
AllowOverride Options FileInfo
</Directory>


this should work

mediman
My Projects: http://ticker-oase.de 
Please do not PM me with support requests.

TheGamer

cPanel makes all of this real simple.

-TheGamer

dtm.exe

Quote from: TheGamer on June 20, 2005, 04:15:05 PM
cPanel makes all of this real simple.

-TheGamer

I don't use cPanel.  Mediman, thank you, I'll try that out.

-Dan The Man

mediman

Quote from: OIDanTheManIO on June 20, 2005, 05:45:59 PM
Quote from: TheGamer on June 20, 2005, 04:15:05 PM
cPanel makes all of this real simple.

-TheGamer

I don't use cPanel.  Mediman, thank you, I'll try that out.

-Dan The Man

if you have further issues, feel free tu send me a pn or even mail ...

mediman
My Projects: http://ticker-oase.de 
Please do not PM me with support requests.

Advertisement: