Website
.htaccess伪静态实际运用
自定义404页面 ErrorDocument 404 /404.php 将.php转换为.html RewriteEngine On RewriteRule ^index.html$ index.php [QSA,L] RewriteRule ^kr-severdetails.html$ kr-severdetails.php [QSA,L] QSA用于在URL中截取查询的字段,L为只要符合当前判断,立即停止。 当我访问index.html时,实际请求index.php的内容并返回参数。 将设置访问权限 <Files 403.shtml> order allow,deny allow from all </Files> RewriteRule list/([1-9]+[0-9]*).html$ list.php?pid=$1 [QSA] 原链接:http://www.xxx.com/list.php?pid=1 伪静态:http://www.xxx.com/list/1.html 控制PHP版本 # php — BEGIN cPanel-generated handler, do not edit # This domain inherits the “PHP” package. # Read more…