hide image path possible with htaccess?

后端 未结 1 1857
别跟我提以往
别跟我提以往 2021-01-26 22:29

I got image path like that http://blablablabla.com/Admin/img/blablabla.jpg but i do not want to show this path user can i hide this URL with htaccess ?

相关标签:
1条回答
  • 2021-01-26 23:34

    Rewriting your url will not make a difference security-wise. If the only security you have is hoping that no-one will ever know that a certain folder exists, then you have no security at all.

    The requested rewrite can be done by placing the following directives in a .htaccess file in the www-root of your website.

    RewriteEngine on
    RewriteRule ^Info/img/([^/]+)$ Admin/img/$1 [L]
    

    This is an internal rewrite that rewrites the url that is requested to an internal url that points to an actual file. $1 is replaced by the first capture group. See the documentation for more information.

    0 讨论(0)
提交回复
热议问题