隐藏用户PHP [英] Hide PHP from user

查看:164
本文介绍了隐藏用户PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法来隐藏我使用PHP从我的用户这个事实?我想这样做的原因有两个:

  • 1),因此,在地址栏看起来更整洁()的链接喜欢这里的计算器
  • 2)prevent潜在立刻会意的黑客要寻找什么

时的第2点甚至现实或将黑客知道我使用的是什么呢?我使用nginx的使用PHP5-FPM。

解决方案

  RewriteEngine叙述上
的RewriteCond%{} REQUEST_FILENAME!-d
的RewriteCond%{REQUEST_FILENAME} \ PHP -f
重写规则^(。*)$ $ 1.PHP
 

http://eisabainyo.net/weblog / 2007/08/19 /删除文件 - 扩展 - 通过-htaccess的/

Is there a way to hide the fact that I'm using PHP from my users? I wanted to do this for two reasons:

  • 1) So the links in the address bar look cleaner (like here on stackoverflow)
  • 2) To prevent potential hackers of knowing immediately what to look for

Is point 2 even realistic or will a hacker know what I'm using anyway? I'm using nginx with php5-fpm.

解决方案

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

http://eisabainyo.net/weblog/2007/08/19/removing-file-extension-via-htaccess/

这篇关于隐藏用户PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆