1. Set in httpd. conf: ServerName110.110.110.000 # the IP address is the IPNameVirtualHost110.110.110.0002. configure the domain name and second-level domain name # implement second-level domain name authorization: tolowerRewriteMapvhosttxt: kncmsv
1. in httpd. set in conf: ServerName 110.110.110.000 # the IP address is the IP NameVirtualHost 110.110.110.000 you applied. configure domain name and second-level domain name # implement second-level domain name IfModule mod_rewrite.c RewriteMap lowercase int: tolower RewriteMap vhost txt:/kncms/vhost. map # Content
1. Set in httpd. conf:
ServerName 110.110.110.000 # Where IP is the IP address you applied
NameVirtualHost 110.110.110.000
2. Configure the domain name and second-level domain name
# Implementing second-level domain names
RewriteMap lowercase int: tolower
RewriteMap vhost txt: /Kncms/vhost. map# Content later
RewriteCond $ {lowercase: % {SERVER_NAME} ^ (. +) $
RewriteCond $ {vhost: % 1} ^ (/. *) $
RewriteRule ^/(. *) $ % 1/$1
DocumentRoot indicates the disk path where the program is stored.
ServerName indicates Domain Name
DocumentRoot/cms/
ServerName Domain Name
DocumentRoot/cms/
ServerName Level 1 domain name. com
DocumentRoot/cms/discuz/
ServerName bbs. First-level domain name. com # second-level domain name must have a top-level domain name to have second-level domain name
# Jump to a static page
RewriteEngine On
RewriteRule ^ (. *)/archiver/(fid | tid)-[/w/-00000000.html) $1/archiver/index. php? $2
RewriteRule ^ (. *)/forum-(%0-9%%*-(%0-9%%%%%%%.html $1/forumdisplay. php? Fid = $2 & page = $3
RewriteRule ^ (. *)/thread-(0-9000000000000-(0-9000000000000-(0-90000000000000000.html $1/viewthread. php? Tid = $2 & extra = page/% 3D $4 & page = $3
RewriteRule ^ (. *)/space-(username | uid0000-(.20.0000.html $1/space. php? $2 = $3
DocumentRoot/kncms/uchome/
ServerName home.edukn.com
RewriteEngine On
RewriteRule/(space | network)/-(.20.0000.html $/$ 1.php? Rewrite = $2 [L]
RewriteRule/(space | network).html $/$ 1.php [L]
RewriteRule/([0-9] +) $/space. php? Uid = $1 [L]
Vhost. map Content
Www.edukn.cn/cms/
Www.edukn.com/cms/
Bbs.edukn.com/cms/discuz/
Home.edukn.com/cms/uchome/