PHP伪静态Rewrite设置之APACHE篇
(编辑:jimmy 日期: 2025/5/18 浏览:3 次 )
一、Apache配置:
1、支持httpd.conf 配置
2、支持目录 .htaccess配置(一种"分布式配置"文件针对虚拟空间,空间商不让修改Apache配置文件)
启用Rewrite(httpd.conf)
(有时候Options Indexes FollowSymLinks会出问题,只需要配置Options all即可)
LoadModule rewrite_module modules/mod_rewrite.so
启用.htaccess
AllowOverride None 修改为:AllowOverride All
二、mod_rewrite 规则:
例如:
RewriteEngine on ->启动rewrite引擎 RewriteRule ^/test([0-9]*).html$ /test.php"htmlcode">RewriteRule ^/new([0-9]*)/$ /new.php"htmlcode">RewriteEngine on RewriteRule ^/in(.*).html$ /index.php
下一篇:PHP return语句的另一个作用
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。