这是我要说的安全细节的道路。
http://localhost/application/secure_details
secure_details是我的机密文件上传的文件夹。
第三位知道上述网址的人可以得到具体的细节,
这是不应该允许的。如果用户直接访问这个特定的URL,我需要重定向到error_page。
发布于 2013-08-26 11:17:08
使用mod_rewrite,将其添加到根.htaccess中
RewriteEngine on
RewriteBase /
RewriteRule ^application/secure_details/?.*?$ /error.html [L,R=301]此外,将此.htaccess文件添加到secure_details目录中:
Deny from all发布于 2013-08-26 11:18:48
首先,您需要在apache中启用重写模块,以便使用htaccess。之后,您可以使用以下脚本来保护您的url
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^/*application/secure_details error.php[L,NC,QSA]在error.php文件中,您可以编写错误消息
https://stackoverflow.com/questions/18442787
复制相似问题