˹ܿԽֳҳ( forumdisplay.phpshowthread.php ) URL ̬תγ http://localhost/forum-1.html ʽĳӣӶʹ̳ݸױھ߱¼Ļʡ 

:̬url rewrite 1.0 
ߣguyefeng 
汾MolyX2.6.1
ƽ̨apache iis
֧֣http://www.molyx.com 

==================================================
װ˵ 

apacheû
1.Apache Web Serverû

ȷķapacheweb
ȷʹõ 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м´롣ʱע⣬վʹͨ壬ؼӵã <VirtualHost> ȥⲿ޷ʹáĺúȻ Apache 

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)-([0-9]+).html[?]{0,1}(.*)$ $1/forumdisplay.php?f=$2&st=$4&pp=$3&$5
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+).html[?]{0,1}(.*)$ $1/forumdisplay.php?f=$2&pp=$3&$4
RewriteRule ^(.*)/forum-([0-9]+).html[?]{0,1}(.*)$ $1/forumdisplay.php?f=$2&$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+).html[?]{0,1}(.*)$ $1/showthread.php?t=$2&pp=$3&$4
RewriteRule ^(.*)/thread-([0-9]+).html[?]{0,1}(.*)$ $1/showthread.php?t=$2&$3
RewriteRule ^(.*)/user-([0-9]+).html $1/profile.php?u=$2[L]
RewriteRule ^(.*)/archive/f-([0-9]+)-([0-9]+).html $1/index.php?f$2-$3.html[L]
RewriteRule ^(.*)/archive/t-([0-9]+)-([0-9]+).html $1/index.php?t$2-$3.html[L]
</IfModule>

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

2.Apache Web Serverû

ڿʼ֮ǰѯĿռ̣ռǷ֧ Rewrite ԼǷֶ֧վĿ¼ .htaccess ļ򼴱㰴ķúˣҲ޷ʹá 

̳Ŀ¼Ƿ .htaccess ļڣֹļ༭޸ıĿ¼µ .htaccess ļ

#  RewriteEngine ģʽ
RewriteEngine On

# ޸е /molyx_board Ϊ̳Ŀ¼ַڸĿ¼У뽫 /molyx_board ޸Ϊ /
RewriteBase /molyx_board 

# Rewrite ϵͳ޸
RewriteRule forum-([0-9]+)-([0-9]+)-([0-9]+).html[?]{0,1}(.*)$ forumdisplay.php?f=$1&st=$3&pp=$2&$4
RewriteRule forum-([0-9]+)-([0-9]+).html[?]{0,1}(.*)$ forumdisplay.php?f=$1&pp=$2&$3
RewriteRule forum-([0-9]+).html[?]{0,1}(.*)$ forumdisplay.php?f=$1&$2
RewriteRule thread-([0-9]+)-([0-9]+).html[?]{0,1}(.*)$ showthread.php?t=$1&pp=$2&$3
RewriteRule thread-([0-9]+).html(.*)$ showthread.php?t=$1&$2
RewriteRule user-([0-9]+).html profile.php?u=$1
RewriteRule archive/f-([0-9]+)-([0-9]+).html archive/index.php?f$1-$2.html
RewriteRule archive/t-([0-9]+)-([0-9]+).html archive/index.php?t$1-$2.html

ʾ޸̳ڵ·Ȼ󱣴档 .htaccess ļϴ̳ڵĿ¼С 

3.IISû

,ISAPI_RewriteISAPI_Rewrite־(Lite)ȫ(Full)档治ֶ֧ÿ
վдֻܽȫִзѣҲ͹ˡ

MolyX򾫼صַhttp://www.molyx.com/RewriteIIS.zip ѹطϣ·

Internet ϢҼwebվԣISAPIɸѡѡɸѡ,Լ磺rewrite·ָһѹRewrite.dllļȷ

4.̳ϵͳãҪ URL ̬ ܡ