用于运行页面的 PHP URI 结构


PHP URI structure for running pages

为网站而不是每个以.php结尾的页面提供自定义 URI 结构。

例如,如果我想 example.com/balderdash 包括(balderdash.php)这是如何做到的。

if($_SERVER["REQUEST_URI"] == 'balderdash'){ include('balderdash.php') }

在索引.php文件夹中?

你需要的是"htaccess url重写"。

请阅读以下内容: http://corz.org/serv/tricks/htaccess2.php