The IssueHotlink protection is undeniably a good thing. However, when using the tool in CPanel, it will not support browsing to the domain without the trailing / mark. That means that
Will show your images as expected, however,
will not. At this point, I should point out that CPanel is not a Lunar Pages product, so whilst we make recommendations for updates, we are not directly able to control these updates.
To make the hotlink protection work correctly, you will need to do a small amount of editing to your .htaccess file. No this How To: is concentrating on protecting your whole site, I will deal with protecting parts of your site in another How To: and so you will be using the .htaccess found directly inside your public_html folder today.
To make this tutorial as easy as possible we will be using the Hotlink Protection tool inside CPanel. So start by logining into your account, and clicking on the Hotlink protection icon. The first thing you should notice is the very large white box on the screen. This is where you type in the URLs that you want to allow to 'Hotlink' to your site.
Simply type in the urls that you want to allow to hotlink as you would type them into a browser, for example our URLs would be typed:
Be sure only to type in the format above, do not worry about typing addresses with and without the www. prefix, or with a page afterwards, such as index.htm, as we will take care of this soon.
Click on the 'Activate' button. This will automatically generate the basic hotlink protection scripting for your .htaccess file, and of course put it in place.
Next step, is to go back to the CPanel (click the 'home' icon on the CPanel banner). Click on File Manager, then click on the folder icon next to public_html to enter the folder, followed by clicking on the word .htaccess. On the right hand side of the screen, a menu will appear, click on 'edit file'.
What you should see is a screen with some lines of code as follows (I have used the lunarpages and lunarforums from above, your code will have your domain in it)
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://www.luarforums.com/.*$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
Now, here's the good bit. I want you to change the text to include the parts below in red, so it looks like this example.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?lunarforum.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ - [F,NC]
Click on the save button at the bottom of this page. That's it, your site is now hotlink protected, and people will be able to view the site from just typing in your domain name, even without the trailing / mark.