由网友(复制)分享简介:如果我有site.com/page/about.php If I have site.com/page/about.php如何删除子目录和文件扩展名?How can I remove the sub directory and file extension?例:site.com/about Example:...
如果我有site.com/page/about.php
If I have site.com/page/about.php
如何删除子目录和文件扩展名?
How can I remove the sub directory and file extension?
例:site.com/about
Example: site.com/about
推荐答案
在你的.htaccess文件使用此
Use this in your .htaccess file
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^about(/?)$ /page/about.php [NC,L]
在你的根文件夹中创建你的.htaccess。
Create your .htaccess in your root folder.
相关推荐
最新文章