I have a hand-coded .htaccess file with both hotlinking protection code in it and some other rewrite rules. When I uploaded it to my web server, I noticed that the hotlinking protection wouldn't work, although cpanel said hotlinking protection was enabled. Here's a portion of my .htaccess file:
When I went into the control panel and clicked on Disable Hotlinking, here's what cpanel did to my .htaccess file:
Seems as though cpanel has a bug. Is there something that can be done about this? I'd appreciate some comments from cpanel staff about this issue. Thanks.
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?napathon.net(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.napathon.net/images/nohotlink.gif [R,NC]
RewriteRule ^AlbumID([0-9]+)\.html /TrackListRedirect.php?AlbumID=$1 [L]
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?napathon.net(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.napathon.net/images/nohotlink.gif [R,NC]http://www.napathon.net/TrackListRedirect.php?AlbumID=$1