文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Linux系统实现HTTP服务的URLrewrite功能

Linux系统实现HTTP服务的URLrewrite功能

时间:2009-03-23  来源:sjhf

Linux系统实现HTTP服务的rewrite功能   概述:rewrite功能就是在apache服务器安装时候注意要安装mod_rewrite模块,然后针对其在具体的解释时候以正则表达式进行替换。   具体步骤: 1.源码方式安装apache2   2.安装后查看/usr/local/etc/apache22/httpd.conf中是否有
  LoadModule rewrite_module libexec/apache22/mod_rewrite.so
  没有就重装apache2,安装时候选mod_rewrite
  3.编辑 /usr/local/etc/apache22/Includes/httpd-vhost.conf
  ee /usr/local/etc/apache22/Includes/httpd-vhost.conf
  4.在相应的虚拟目录中加入   <IfModule rewrite_module>
                RewriteEngine On
                #RewriteLog "/var/log/rewrite_log"
                #RewriteLogLevel 10
                RewriteRule ^(.*)/page_(.*)\.html$ $1/page/index.php?pid=$2
  RewriteRule ^(.*)/(.*)\.html$ $1/index.php?Command=$2
   </IfModule>
  5.apachectl restart
相关阅读 更多 +
排行榜 更多 +
拉力竞速2

拉力竞速2

体育竞技 下载
文字乱舞水浒

文字乱舞水浒

角色扮演 下载
蓝图公考

蓝图公考

学习教育 下载