PhunkyMonkey
08-24-2006, 01:56 PM
I've been reading up on how to stop hotlinking from a specific site
(myspace is the devil), but there is something I am not sure of...
Where do I ender the code in my .htaccess file?
Do I replace the whole file with the code, or enter it between the lines? Currently the file looks like this ~
### CNC_START: BEGIN CUSTOM WEBSITE CONFIGURATION
### DO NOT EDIT THIS SECTION, CHANGES WILL BE LOST
Options +Indexes
php_value error_reporting 7
php_flag display_errors off
### CNC_END: END CUSTOM WEBSITE CONFIGURATION
The code I was planning on adding is from this site ~
http://altlab.com/htaccess_tutorial.html
Which should display a 403 Forbidden error code instead of an image.
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myspace\.com/ [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
So, where does this code go?
Also, if you know if any problems with the code, please let me know of a better one.
I know there are a lot of them on the forums, but they all seemed to use an image.
Any help is appreciated ;)
(myspace is the devil), but there is something I am not sure of...
Where do I ender the code in my .htaccess file?
Do I replace the whole file with the code, or enter it between the lines? Currently the file looks like this ~
### CNC_START: BEGIN CUSTOM WEBSITE CONFIGURATION
### DO NOT EDIT THIS SECTION, CHANGES WILL BE LOST
Options +Indexes
php_value error_reporting 7
php_flag display_errors off
### CNC_END: END CUSTOM WEBSITE CONFIGURATION
The code I was planning on adding is from this site ~
http://altlab.com/htaccess_tutorial.html
Which should display a 403 Forbidden error code instead of an image.
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://(.+\.)?myspace\.com/ [NC]
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
So, where does this code go?
Also, if you know if any problems with the code, please let me know of a better one.
I know there are a lot of them on the forums, but they all seemed to use an image.
Any help is appreciated ;)