

    SupSite/X-Space Rewrite˵
    ------------------------------
    http://www.supesite.com
    http://X-Space.discuz.net

    ===============================================
    + Apache Web Serverû
    ===============================================


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

    ע⣺

    ¹򣬽ڳͨ߶ֱӷʡ
    ĳҪĿ¼ķʽſԷʣôҪֹ޸¹

     RewriteBase / 	޸Ϊ RewriteBase /xxx

    Уxxx ΪĳĿ¼


    -----------------------------------------------------------------------

    RewriteEngine On
    RewriteBase /
    RewriteRule ^([0-9]+)/spacelist_(.*)$ index.php?$1/action_spacelist_$2
    RewriteRule ^([0-9]+)/viewspace_(.+)$ index.php?$1/action_viewspace_itemid_$2
    RewriteRule ^([0-9]+)/viewbbs_(.+)$ index.php?$1/action_viewbbs_tid_$2
    RewriteRule ^([0-9]+)/(.*)$ index.php?$1/$2
    RewriteRule ^([0-9]+)$ index.php?$1
    RewriteRule ^action_(.+)$ index.php?action_$1
    RewriteRule ^category_(.+)$ index.php?action_category_catid_$1
    RewriteRule ^itemlist_(.+)$ index.php?action_itemlist_catid_$1
    RewriteRule ^viewnews_(.+)$ index.php?action_viewnews_itemid_$1
    RewriteRule ^viewthread_(.+)$ index.php?action_viewthread_tid_$1
    RewriteRule ^index([\.a-zA-Z0-9]*)$ index.php

    -----------------------------------------------------------------------

    ʱʾ޸ĳڵ·
    Ȼ󱣴Ϊļ .htaccess  .htaccess ļϴSupeSiteڵĿ¼
    SupeSite ϵͳãҪ 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м´
    ʱע⣬վʹͨ
    ؼӵã <VirtualHost> ȥⲿ޷ʹ
    ĺúȻ Apache  

    ע⣺

    ¹򣬽ڳͨ߶ֱӷʡ
    ĳҪĿ¼ķʽſԷʣôҪֹ޸¹

     ^/ 		޸Ϊ ^/xxx/
     /index.php 	޸Ϊ /xxx/index.php

    Уxxx ΪĳĿ¼

    -----------------------------------------------------------------------

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^/([0-9]+)/spacelist_(.*)$ /index.php?$1/action_spacelist_$2
    RewriteRule ^/([0-9]+)/viewspace_(.+)$ /index.php?$1/action_viewspace_itemid_$2
    RewriteRule ^/([0-9]+)/viewbbs_(.+)$ /index.php?$1/action_viewbbs_tid_$2
    RewriteRule ^/([0-9]+)/(.*)$ /index.php?$1/$2
    RewriteRule ^/([0-9]+)$ /index.php?$1
    RewriteRule ^/action_(.+)$ /index.php?action_$1
    RewriteRule ^/category_(.+)$ /index.php?action_category_catid_$1
    RewriteRule ^/itemlist_(.+)$ /index.php?action_itemlist_catid_$1
    RewriteRule ^/viewnews_(.+)$ /index.php?action_viewnews_itemid_$1
    RewriteRule ^/viewthread_(.+)$ /index.php?action_viewthread_tid_$1
    RewriteRule ^/index([\.a-zA-Z0-9]*)$ /index.php
    </IfModule>

    -----------------------------------------------------------------------

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

    SupeSite ϵͳãҪ URL ̬ 


    ===============================================
    + IISWindowsû
    ===============================================


    ȣҪװģ

    װǣiisrewrite.zipеļѹһĿ¼С
    IIS -> ѡվ -> ISAPIɸѡ -> rewrite ->
    ִļѡղŽѹļRewrite.dll -> ȷ
    -> ٵȷ -> رԶԻ
    ٴβ鿴վ -> ISAPIɸѡ
    ״̬Ϊϵɫͷ˵Rewriteģ鰲װɹ

    Ȼ޸Rewrite

    ղŽѹĿ¼£ҵhttpd.iniļ
    httpd.iniĹ򣬽ڳͨ߶ֱӷʡ
    ĳҪĿ¼ķʽſԷʣôҪֹ޸httpd.iniĹ

     ^/ 		޸Ϊ ^/xxx/
     /index\.php 	޸Ϊ /xxx/index\.php
    Уxxx ΪĳĿ¼


    һ޸RewriteվʹЧ


    (C) 2001-2006 Comsenz Technology Ltd

