UBB.Dev
Posted By: RTeam .htaccess, UBBT 6.5 and weird problem - 08/13/2004 1:22 AM
We just moved to a new Linux server and installed UBBT 6.5 b4. To prevent people from linking our pictures directly, I installed a .htaccess file in the /uploads directory.
When somebody from a different server puts a direct link to these files, a different "No Linking" Picture is shown.

I used this text in the .htaccess file (chmod 644):

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domainname\.com(/.*)?$ [NC]
RewriteRule \.(gif|jpg|jpeg|pdf|mp3|GIF|JPG|JPEG|PDF|MP3)$ http://www.domainname.com/upload-int/nolink.gif [R,L]

Now the strange thing: it worked for about half and hour and when I attached an attachment (picture) to one of my posts in the forum, suddenly, the whole thing didn't work anymore and direct linking is possible again and the nolink.gif picture doesn't show up.

What am I doing wrong? Why doesn't it work?
We're on a dedicated managed server, I don't have root access.

Thanks for any hint.
Posted By: ericgtr Re: .htaccess, UBBT 6.5 and weird problem - 08/13/2004 2:39 AM
Here is what I use and it always works well, also I always drop it into the public_html dir.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://yourdomain.(.*) [NC]
RewriteCond %{HTTP_REFERER} !^http://(.*).yourdomain.(.*) [NC]
RewriteRule \.(gif|jpg|jpeg|pdf|mp3|GIF|JPG|JPEG|PDF|MP3)$ http://www.domainname.com/upload-int/nolink.gif [R,L]
Posted By: msula Re: .htaccess, UBBT 6.5 and weird problem - 08/13/2004 5:03 AM
[]RTeam said:
What am I doing wrong? Why doesn't it work?
We're on a dedicated managed server, I don't have root access.

Thanks for any hint. [/]

Hmm.. without root access, and knowing that it is managed for you, it might be possible they run automatic updates, and it overwrites some files/settings on the server.

Have you checked to make sure the settings you set are still setup correctly?
© UBB.Developers