There are currently 2 posts.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
1471 1
【备份】apache重写规则
UbuntuFF测试员
初级魔法师 五级
Reply
Floor 1 Posted at: 10/26/10 12:43
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
UbuntuFF测试员
初级魔法师 五级
Reply
Floor 2 Posted at: 10/26/10 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]
Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 1471 Replies: 1
Author: UbuntuFF测试员
Last reply: UbuntuFF测试员
Last reply time: 10/26/10 12:44
Good area: 代码备份区
Bar Hot Posts
Bar Good Posts
Announcements