隐藏PHP扩展 [英] Hiding PHP extension

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

问题描述

我应该将php扩展隐藏在一个文件中(比如Yahoo!或

Google)。例如, http://foo.com/foo 而不是
http://foo.com/foo.php 。我读过各种文章,包括

< http://in2.php.net/security.hiding> 。当然mod_rewrite不是

正确的选择。在Apache中,file.php &安培; "文件"被视为相同

(内容协商??)并且想知道它有多可靠?有没有

任何其他选项来做同样的事情? TIA


-
http:// www .sendmetoindia.com - 把我送到印度!

电邮:rrjanbiah-at-Y!com

解决方案

< BLOCKQUOTE> R上。 Rajesh Jeba Anbiah< ng ********** @ rediffmail.com>写道或引用:

我应该将php扩展隐藏在一个文件中(如Yahoo!或Google)。例如, http://foo.com/foo
而不是 http://foo.com/foo.php




使用 http://foo.com/foo/ 相反。

-

__________

| im | yler http://timtyler.org/ ti*@tt1lock.org 删除锁定进行回复。


周五,2004年4月2日10:21:15 +0000,Tim Tyler写道:

R. Rajesh Jeba Anbiah <纳克********** @ rediffmail.com>写道或引用:

我应该将php扩展隐藏在一个文件中(如Yahoo!或Google)。例如, http://foo.com/foo
而不是 http://foo.com/foo.php



改为使用 http://foo.com/foo/



这将失败..因为它会查找目录。 OP是对的..

我不会怀疑他们的方式有什么问题..虽然我可能

缺少一些隐藏的问题。 />

问候,


Ian


-

Ian.H

digiServ网络

伦敦,英国
http://digiserv.net/


R. Rajesh Jeba Anbiah写道:

例如, http://foo.com/ foo 而不是
http://foo.com/foo.php
有没有
其他选项可以做同样的事情? TIA




我这样做:

DocumentRoot中的
..htaccess


ErrorDocument 404 /notfound.php

和/notfound.php

<?php

// validate


I''m supposed to hide the php extension in a file (like Yahoo! or
Google). For example, http://foo.com/foo instead of
http://foo.com/foo.php. I have read various articles including
<http://in2.php.net/security.hiding> . Certainly mod_rewrite is not
the right option. In Apache, "file.php" & "file" are treated as same
(content negotiation??) and like to know, how reliable it is? Is there
any other options to do the same? TIA

--
http://www.sendmetoindia.com - Send Me to India!
Email: rrjanbiah-at-Y!com

解决方案

R. Rajesh Jeba Anbiah <ng**********@rediffmail.com> wrote or quoted:

I''m supposed to hide the php extension in a file
(like Yahoo! or Google). For example, http://foo.com/foo
instead of http://foo.com/foo.php.



Use http://foo.com/foo/ instead.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.


On Fri, 02 Apr 2004 10:21:15 +0000, Tim Tyler wrote:

R. Rajesh Jeba Anbiah <ng**********@rediffmail.com> wrote or quoted:

I''m supposed to hide the php extension in a file
(like Yahoo! or Google). For example, http://foo.com/foo
instead of http://foo.com/foo.php.



Use http://foo.com/foo/ instead.


This will fail.. as it will look for a directory. The OP has it right..
and I don''t forsee any issues with the way they have it.. although I maybe
missing some hidden issues.

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/


R. Rajesh Jeba Anbiah wrote:

For example, http://foo.com/foo instead of
http://foo.com/foo.php. Is there
any other options to do the same? TIA



I do:

..htaccess in DocumentRoot

ErrorDocument 404 /notfound.php
and /notfound.php

<?php
// validate


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

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