目前共有2篇帖子。
【備份】apache重寫規則
1樓 UbuntuFF测试员 2010-10-26 12:43
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
2樓 UbuntuFF测试员 2010-10-26 12:44
# 公共虛擬目錄
    RewriteEngine on
    RewriteRule ^/fictitious/(.*)$ /web/php/include/$1
    
    # 貼吧
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^tieba.blue.cat$
    RewriteCond %{REQUEST_URI} !^/web/php/tieba/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /web/php/tieba/$1
    RewriteCond %{HTTP_HOST} ^tieba.blue.cat$
    RewriteRule ^(/)?$ /web/php/tieba/index.php [L]
    
    # 消息
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^msg.blue.cat$
    RewriteCond %{REQUEST_URI} !^/web/php/msg/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /web/php/msg/$1
    RewriteCond %{HTTP_HOST} ^msg.blue.cat$
    RewriteRule ^(/)?$ /web/php/msg/index.php [L]
    
    #------------------------------------------------------------
    # phpMyAdmin
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^220.221.122.15$
    RewriteCond %{REQUEST_URI} !^/web/php/phpMyAdmin/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /web/php/phpMyAdmin/$1
    RewriteCond %{HTTP_HOST} ^220.221.122.15$
    RewriteRule ^(/)?$ /web/php/phpMyAdmin/index.php [L]
    
    # TH
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^phpserver$
    RewriteCond %{REQUEST_URI} !^/web/other/TH/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /web/other/TH/$1
    RewriteCond %{HTTP_HOST} ^phpserver$
    RewriteRule ^(/)?$ /web/other/TH/index.php [L]

回復帖子

  抱歉,本吧禁止發帖
內容:
用戶名: 您目前是匿名發表
 
 
©2010-2024 Arslanbar [手機版] [桌面版]
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。