尔游网
您的当前位置:首页PHP实现页面静态化、纯静态化及伪静态化

PHP实现页面静态化、纯静态化及伪静态化

来源:尔游网


rewrite伪静态配置

<VirtualHost *:80>
 ServerAdmin webmaster@dummy-host.example.com
 DocumentRoot "c:/Apache24/docs/dummy-host.example.com"
 ServerName dummy-host.example.com
 ServerAlias www.dummy-host.example.com
 ErrorLog "logs/dummy-host.example.com-error.log"
 CustomLog "logs/dummy-host.example.com-access.log" common
 #配置规则如下所示
 RewriteEngine on
 RewriteRule ^/vidio/([0-9]*).html$ /vidio.php?id=$1
 
</VirtualHost>

也可用.htacess文件,放在网站目录下,无需重启服务器。

更多php相关知识,请访问php教程!

显示全文