#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at 
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

### lab2.serveropt.com
<VirtualHost *:80>
    ServerAdmin nanu@163.com
    DocumentRoot "E:/WebENV/www/wwwroot/lab2.serveropt.com"
    ServerName *
    ErrorLog "E:/WebENV/www/logs/lab2.serveropt.com-error.log"
    CustomLog "E:/WebENV/www/logs/lab2.serveropt.com-access.log" combined
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule ^(.*)/archiver/([a-z0-9\-]+\.html)$ $1/archiver/index.php?$2
        RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
        RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
        RewriteRule ^(.*)/profile-(username|uid)-(.+?)\.html$ $1/viewpro.php?$2=$3
		RewriteRule ^ss-xs/([0-9]+)/spacelist(.*)$ /index.php?$1/action_spacelist$2
		RewriteRule ^ss-xs/([0-9]+)/viewspace_(.+)$ /index.php?$1/action_viewspace_itemid_$2
		RewriteRule ^ss-xs/([0-9]+)/viewbbs_(.+)$ /index.php?$1/action_viewbbs_tid_$2
		RewriteRule ^ss-xs/([0-9]+)/(.*)$ /index.php?$1/$2
		RewriteRule ^ss-xs/([0-9]+)$ /index.php?$1
		RewriteRule ^ss-xs/action_(.+)$ /index.php?action_$1
		RewriteRule ^ss-xs/category_(.+)$ /index.php?action_category_catid_$1
		RewriteRule ^ss-xs/itemlist_(.+)$ /index.php?action_itemlist_catid_$1
		RewriteRule ^ss-xs/viewnews_(.+)$ /index.php?action_viewnews_itemid_$1
		RewriteRule ^ss-xs/viewthread_(.+)$ /index.php?action_viewthread_tid_$1
		RewriteRule ^ss-xs/index([\.a-zA-Z0-9]*)$ /index.php
    </IfModule>
</VirtualHost>
