1
|
LoadModule rewrite_module modules /mod_rewrite .so
|
1
2
3
4
5
6
|
RewriteEngine on RewriteMap lowercase int:tolower RewriteMap vhost txt: /etc/httpd/vhost .map #路径可修改
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$ RewriteCond ${vhost:%1} ^(/.*)$ RewriteRule ^(.*)$ %1$1 |
1
|
service httpd restart |
1
2
|
cd /etc/httpd/vhost .map
vim vhost.map |
1
|
www.mykurol.com /var/www/html
|
本文转自谢育政 51CTO博客,原文链接:http://blog.51cto.com/kurolz/1911148,如需转载请自行联系原作者