
һ̬
¼PB̨ѡϵͳá->á->URLд

ã

Apache Web Serverû

ȷʹõ Apache 汾ԼǷ mod_rewrite ģ顣

Apache 1.x

 conf/httpd.conf Ƿδ룺 

LoadModule rewrite_module libexec/mod_rewrite.so

AddModule mod_rewrite.c

Apache 2.x

 conf/httpd.conf Ƿһδ룺

LoadModule rewrite_module modules/mod_rewrite.so

ڣôļͨ conf/httpd.confм´롣ʱע⣬վʹͨ壬ؼӵã ȥⲿ޷ʹáĺúȻ Apache  


RewriteEngine On
RewriteRule ^index\.html(&page=([0-9]+))?$ index.php?page=$2
RewriteRule ^category/([0-9]+)(&page=([0-9]+))?$ category.php?cid=$1&page=$3
RewriteRule ^user/([0-9]+)(&page=([0-9]+))?$ user.php?uid=$1&page=$3
RewriteRule ^show/([0-9]+)\.html(&page=([0-9]+))?$ show.php?tid=$1&page=$3


ûаװ mod_rewrite± Apacheԭ configure м --enable-rewrite=sharedȻ Apache ļм뼴ɡ



Apache Web Serverû

ҪѯĿռ̣ռǷ֧ Rewrite ԼǷֶ֧վĿ¼ .htaccess ļ̬޷ʹáȻԴhttp://www.pbdigg.net.htaccessļñ༭ļúòļϴPBDIGGڵĿ¼мȿɡ