SupeV URL ̬ 

SupeV URL ̬ ܵڷԼڿ˹֮ǰ Web ѡӦĻ÷пɷ޷߹Ч½ṩ Apache  Zeus ÷IIS  Web ɸԭ޸ġ

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

<IfModule mod_rewrite.c>
        RewriteEngine On
	RewriteRule ^(.*)/ivideo(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ $1/ivideo.php?tv=$3&ti=$5&tc=$7&page=$9
	RewriteRule ^(.*)/ispecial(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ $1/ispecial.php?tv=$3&ti=$5&tc=$7&page=$9
	RewriteRule ^(.*)/icategory\.html$ $1/icategory.php
	RewriteRule ^(.*)/category-cid-([0-9]+)(-tag-([^-]*))?(-timelimit-([0-9]+))?(-orderlimit-([0-9]+))?(-page-([0-9]+))?\.html$ $1/category.php?cid=$2&tag=$4&timelimit=$6&orderlimit=$8&page=$10
	RewriteRule ^(.*)/vspace-(mid|username)-(.+)\.html$ $1/vspace.php?$2=$3
	RewriteRule ^(.*)/video-(vid|ivid)-(.+)\.html$ $1/video.php?$2=$3
	RewriteRule ^(.*)/special-spid-([0-9]+)\.html$ $1/special.php?spid=$2
</IfModule>

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

Apache Web Serverû

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

鲥Ŀ¼Ƿ .htaccess ļڣֹļWin32 ϵͳ£޷ֱӽ .htaccess ļԴϵͳпһݣ discuz.net ֧Ŀشļ༭޸ .htaccess ļ
#  RewriteEngine ģʽ
RewriteEngine On
# ޸е /supev ΪĲĿ¼ַڸĿ¼У뽫 /supev ޸Ϊ /
RewriteBase /supev
# Rewrite ϵͳ޸ RewriteRule

RewriteRule ^ivideo(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ ivideo.php?tv=$2&ti=$4&tc=$6&page=$8
RewriteRule ^ispecial(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ ispecial.php?tv=$2&ti=$4&tc=$6&page=$8
RewriteRule ^icategory\.html$ icategory.php
RewriteRule ^category-cid-([0-9]+)(-tag-([^-]*))?(-timelimit-([0-9]+))?(-orderlimit-([0-9]+))?(-page-([0-9]+))?\.html$ category.php?cid=$1&tag=$3&timelimit=$5&orderlimit=$7&page=$9
RewriteRule ^vspace-(mid|username)-(.+)\.html$ vspace.php?$1=$2
RewriteRule ^video-(vid|ivid)-(.+)\.html$ video.php?$1=$2
RewriteRule ^special-spid-([0-9]+)\.html$ special.php?spid=$1

ʱʾ޸Ĳڵ·Ȼ󱣴档 .htaccess ļϴڵĿ¼СȻ벥ϵͳõŻҪ URL ̬ܡ


IIS Web Serverû

IISα̬صַ

http://download.discuz.net/supev/tools/Rewrite.zip

 IIS  Isapi ɸѡɸѡΪ Rewrite ִļѡ Rewrite.dll  IIS httpd.ini Ѿúã£
[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^(.*)/ivideo(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ $1/ivideo\.php\?tv=$3&ti=$5&tc=$7&page=$9
RewriteRule ^(.*)/ispecial(-tv-([0-9]+))?(-ti-([0-9]+))?(-tc-([0-9]+))?(-page-([0-9]+))?\.html$ $1/ispecial\.php\?tv=$3&ti=$5&tc=$7&page=$9
RewriteRule ^(.*)/icategory\.html$ $1/icategory\.php
RewriteRule ^(.*)/category-cid-([0-9]+)(-tag-([^-]*))?(-timelimit-([0-9]+))?(-orderlimit-([0-9]+))?(-page-([0-9]+))?\.html$ $1/category\.php\?cid=$2&tag=$4&timelimit=$6&orderlimit=$8&page=$10
RewriteRule ^(.*)/vspace-(mid|username)-(.+)\.html$ $1/vspace\.php\?$2=$3
RewriteRule ^(.*)/video-(vid|ivid)-(.+)\.html$ $1/video\.php\?$2=$3
RewriteRule ^(.*)/special-spid-([0-9]+)\.html$ $1/special\.php\?spid=$2


Ȼ̳ϵͳõŻҪ URL ̬ܡ 

õıӸв