复制代码 代码如下:
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteMap vhost txt:/usr/local/etc/apache/vhost.map
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/$1
复制代码 代码如下:
/usr/local/www/data-dist/domain
bbs.domain.com /usr/local/www/data-dist/bbs
anyname.domain.com /usr/local/www/data-dist/anyname
复制代码 代码如下:
rewriteengine on
rewritecond %{HTTP_HOST} [^.]+/.域名/.com$
rewriterule ^(.+) %{HTTP_HOST}$1 [C]
rewriterule ([^.]+)/.域名/.com(.*) /$1$2
新闻热点
疑难解答