Hide image path using htaccess?
I have image path http://blablablabla.com/Admin/img/blablabla.jpg but I don't want to show this path, user can hide this url with htaccess
?
For example: the user will see the following path http://blablablabla.com/Info/img/blablabla.jpg , but I don't have an Info folder, is it possible? so I don't want to see users never see my image paths, useful or not. I am not sure if I will share my ideas what is the safest way to hide my path.
source to share
Rewriting your url will not affect security. If you have only one protection, you are hoping that no one will know that a certain folder exists, then you have no security at all.
The requested rewrite can be accomplished by placing the following directives in a file .htaccess
at the www-root of your site.
RewriteEngine on
RewriteRule ^Info/img/([^/]+)$ Admin/img/$1 [L]
It is an internal rewriter that rewrites the url that is requested to the internal url pointing to the actual file. $1
replaced by the first capture group. For more information, see. In the documentation .
source to share