读书人

linux apache伪静态设立

发布时间: 2013-11-16 23:15:33 作者: rapoo

linux apache伪静态设置
1.编写位置.htaccess,设置文件属性为777

<IFMODULE mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteRule category/(.*)/(.*).html$ category.php?id=$1&page=$2 RewriteRule chapter/ctx_(.*).html$ chapter_ctx.php?id=$1RewriteRule ^t_(.*).html$ test.php?id=$1 [L]</IFMODULE>

2.修改httpd.conf,
vi /etc/httpd/conf/httpd.conf

DocumentRoot "/var/www/html"

后面增加
 AllowOverride All

读书人网 >UNIXLINUX

热点推荐