您好,欢迎访问一九零五行业门户网

lighttpd怎么隐藏.php

lighttpd隐藏.php的方法:1、开启mod_rewrite模块;2、在“/etc/lighttpd/lighttpd.conf”中添加“url.rewrite-once=(...)”;3、进行全部配置即可。
本文操作环境:windows7系统、php7.1版,dell g3电脑
lighttpd中隐藏php后缀方法
1.  开启mod_rewrite模块
2.  在/etc/lighttpd/lighttpd.conf中添加如下 代码
url.rewrite-once=("^/(.+)\?(.+)$" =>"/$1.php?$2","^/(.+)$" =>"/$1.php")
3. 全部配置
$server["socket"] == ":443" { protocol = "https://"url.rewrite-once=("^/(.+)\?(.+)$" =>"/$1.php?$2") ssl.engine = "enable" ssl.pemfile = "/etc/lighttpd/newcert.pem" ssl.ca-file = "/etc/lighttpd/rootca.pem" ssl.verifyclient.activate="enable"setenv.add-environment = ( "https" => "on" ) #server.name = "192.168.6.120"server.document-root = "/var/www2/"}
4. rewrite写规则参考
http://redmine.lighttpd.net/projects/1/wiki/docs_modrewrite
【推荐学习:php视频教程】
以上就是lighttpd怎么隐藏.php的详细内容。
其它类似信息

推荐信息