forbidding URLs to link to files via htaccess
-
Hello All,
I’ve been having a problem with other sites linking images and mp3 from my site, this has given me unreliable statistics. Anyhow, I wanted to add some restriction conditions provided by my host to my current word-press htaccess file. Can anyone tell me:
A.) If this is an uphill battle and I should just let people link away because it can be too complicated for a novice like me.
B.) Where is the best place to put this htaccess conditions? I have either the option to place it in the root htaccess file or in the 2 folders containing the images (pre and post WordPress 2.0.3,see site structure below)
C.)Will there be any future problems depending on which directory I add this htaccess info, i.e. back-up issues, etc.?
D.) Incase I screw up my htacess file, is there a place to find the orginal htaccess file on www.ads-software.com for easy restoring?
Thanks all in advance,
Antonio, Editor
https://www.petitemort.orgWordPress 2.0.3
Site structure:
https://bureaux.petitemort.org/ <- wordpress is installed at root
https://bureaux.petitemort.org/flotsam <-DIR containing my pre wordpress 2.0.3 images
https://bureaux.petitemort.org/wp-content/uploads , FIR containing my post WordPress 2.0.3 images uploaded via admin panel.Comments I would like to add to the exisiting htaccess file:
# BEGIN htaccess linking URLs test 08-29-06
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://(www.)?bureaux.petitemort.org/?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https?://(www.)?blog.360.yahoo.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https?://(www.)?blog.myspace.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https?://(www.)?images.google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https?://(www.)?newsgrist.typepad.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https?://(www.)?petitemort.org/.*$ [NC]
RewriteRule .(gif|jpg|jpeg|png|mp3|mpg|avi|mov)$ - [F,NC]
# END htaccess linking URLs test
- The topic ‘forbidding URLs to link to files via htaccess’ is closed to new replies.