简体   繁体   English

lighttpd重写.php?

[英]Lighttpd rewrite .php?

I need to remove the ".php" from showing in the URL. 我需要从网址中删除“ .php”。 Can anyone tell me how I'd achieve this in the webserver's configuration? 谁能告诉我如何在网络服务器的配置中实现此目标? Also, is it possible with mod_simple_vhost enabled, to change this behaviour based on what site it's serving? 另外,是否可以在启用mod_simple_vhost的情况下根据其服务的站点来更改此行为?

Thanks. 谢谢。

You can use a regular expression in the rewrite rule: 您可以在重写规则中使用正则表达式:

 url.rewrite-once = (
     "^/login(\?.*)$" => "login.php$1"
 }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM