I would like it so that any hotlinked files are simply not displayed, any directly linked files (with referrer info) result in the user being redirected to my home page and any cases with blank referrer info resulting in the image being displayed.
I want to allow display of images on my own domain (www.ohlookaforum.com) and on a couple of my blogs (ohlookaforum.blogspot.com and ohlookaforum.wordpress.com)
Is this code correct? -
- Code: Select all
Options -Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$|.*mp3$|.*wav$|.*swf$|.*mp4$|.*mpg$|.*flv$|.*avi$|.*bmp$|.*jpeg$|.*mpeg$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !ohlookaforum\.com [NC]
RewriteCond %{HTTP_REFERER} !ohlookaforum\.blogspot\.com [NC]
RewriteCond %{HTTP_REFERER} !ohlookaforum\.wordpress\.com [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !yahoo\. [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteRule (.*) /index.php
Assuming it is, is this the correct way to implement it with my phpBB SEO rewrite rules? -
- Code: Select all
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
# You may need to un-comment the following lines
Options +FollowSymlinks
Options -Indexes
# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
# Options -MultiViews
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
# RewriteCond %{HTTP_HOST} !^localhost$ [NC]
# RewriteRule ^(.*)$ http://localhost/$1 [QSA,L,R=301]
# DO NOT GO FURTHER IF THE REQUESTED FILE / DIR DOES EXISTS
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*gif$|.*png$|.*mp3$|.*wav$|.*swf$|.*mp4$|.*mpg$|.*flv$|.*avi$|.*bmp$|.*jpeg$|.*mpeg$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !ohlookaforum\.com [NC]
RewriteCond %{HTTP_REFERER} !ohlookaforum\.blogspot\.com [NC]
RewriteCond %{HTTP_REFERER} !ohlookaforum\.wordpress\.com [NC]
RewriteCond %{HTTP_REFERER} !google\. [NC]
RewriteCond %{HTTP_REFERER} !yahoo\. [NC]
RewriteCond %{HTTP_REFERER} !search\?q=cache [NC]
RewriteRule (.*) /index.php
#####################################################
# PHPBB SEO REWRITE RULES ALL MODES
#####################################################
(everything below this won't be changed and works perfectly now)
Thank you in advance for your help.
Chez

English |
French

