Allows you to search a variety of questions and answers
You can do this via .htaccess either by adding the file to each root directory of the site, or adding the code to the specific container in the httpd.conf file.
There are a few different ways to do this.
1. To replace the hotlinked image with a 'nohotlink.jpg' image, put the following into the .htaccess file:
Code:
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]
2. To prevent linking from specific outside domains like myspace.com, youtube.com, etc..
Code:
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]
To just show a 403 error, replace the last lines in the previous examples with
Code:
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F]
After getting a dedicated server from AYK for almost 2 years, I couldn't be more happy. The prices are very reasonable, I haven't experienced a moment of downtime, the support is excellent and truly 24/7. You have a critical issue at 2am? You will have it sorted out in less than 15 minutes. If you are looking for honest, reliable and affordable hosting provider, look no further!
Best customer service I've encountered anywhere. Great product at a great price.
Best customer service I've encountered anywhere. Great product at a great price.