php forum
php mysql forum
php mysql smarty
 
Topic Options
#278144 - 08/12/04 06:22 PM .htaccess, UBBT 6.5 and weird problem
RTeam Offline
User

Registered: 03/26/02
Posts: 36

   .htaccess, UBBT 6.5 and weird problem to Del.icio.us Add to del.icio.us
  Digg .htaccess, UBBT 6.5 and weird problem Digg it
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.<br />When somebody from a different server puts a direct link to these files, a different "No Linking" Picture is shown.<br /><br />I used this text in the .htaccess file (chmod 644):<br /><br />RewriteEngine on<br />RewriteCond %{HTTP_REFERER} !^$<br />RewriteCond %{HTTP_REFERER} !^http://(www\.)?domainname\.com(/.*)?$ [NC]<br />RewriteRule \.(gif|jpg|jpeg|pdf|mp3|GIF|JPG|JPEG|PDF|MP3)$ http://www.domainname.com/upload-int/nolink.gif [R,L]<br /><br />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.<br /><br />What am I doing wrong? Why doesn't it work?<br />We're on a dedicated managed server, I don't have root access. <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /><br /><br />Thanks for any hint. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />

Top
#278145 - 08/12/04 07:39 PM Re: .htaccess, UBBT 6.5 and weird problem [Re: jlezny]
ericgtr Offline
Junior Member

Registered: 05/12/03
Posts: 1109
Here is what I use and it always works well, also I always drop it into the public_html dir.<br /><br />RewriteEngine on<br />RewriteCond %{HTTP_REFERER} !^$<br />RewriteCond %{HTTP_REFERER} !^http://yourdomain.(.*) [NC]<br />RewriteCond %{HTTP_REFERER} !^http://(.*).yourdomain.(.*) [NC]<br />RewriteRule \.(gif|jpg|jpeg|pdf|mp3|GIF|JPG|JPEG|PDF|MP3)$ http://www.domainname.com/upload-int/nolink.gif [R,L]

Top
#278146 - 08/12/04 10:03 PM Re: .htaccess, UBBT 6.5 and weird problem [Re: jlezny]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
[]RTeam said:<br />What am I doing wrong? Why doesn't it work?<br />We're on a dedicated managed server, I don't have root access. <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /><br /><br />Thanks for any hint. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> [/]<br /><br />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. <br /><br />Have you checked to make sure the settings you set are still setup correctly?

Top


Top Posters Last 30 Days
AllenAyres 18
Gizmo 12
sirdude 6
GEN 3
tackaberry 2
Philipp 2
willing 2
Who's Online
0 Registered (), 35 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Team UBBDev Rides Again!
by Gizmo
08/28/08 11:45 PM
Multiple Identity Detector
by MattUK
08/28/08 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
[7.2.1] - Naked shoutbox
by Iann128
08/22/08 07:27 PM
Nice Ajax Chat
by M4D
08/21/08 10:02 PM
51-card NVIDIA folding rig cranks out 265,200 ppd
by AllenAyres
08/13/08 10:10 PM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.x] AddThis - Social Networking
by Gizmo
08/01/08 01:30 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.3] Dissallow quotes more then 3 levels deep
by blaaskaak
06/09/08 09:01 AM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
Newest Members
welcomeback1, Paug, Tim Keating, anscers, Murphdog
13324 Registered Users

 

 

 
fusionbb message board php hacks