What is the best way to make only index.php able to be visited. For example the link is domain.com.images/1.jpg and it leads to a specific image. And when user goes on that link, how i can make him go directly to index.php without being able to open the image as link.
Asked
Active
Viewed 14 times
0
-
Possible duplicate of [Prevent hotlinking image files](https://stackoverflow.com/questions/19656103/prevent-hotlinking-image-files) – Alberto Martinez Sep 23 '17 at 11:27
-
I used like 40 different codes in .htaccess but none of them does anything. I use cpanel – martin dikov Sep 23 '17 at 13:15
-
They way of doing that is using .htaccess, check that you have enabled the use of .htaccess and that you put `RewriteEngine on` before the rules. – Alberto Martinez Sep 23 '17 at 13:23