apache httpd rewriter configure

RewriteEngine On
RewriteCond %{HTTP_HOST}   ^[^.]+\.test\.com$        
#RewriteRule ^/?$ /%{HTTP_HOST}
RewriteRule ^(.+) %{HTTP_HOST}
#RewriteRule ^/([a-z0-9\-]+)\.test\.com/?$ /test.php?u=$1 [L] 
RewriteRule ^([^.]+)\.test\.com$ /test.php?u=$1 [L] 
RewriteLogLevel 9
RewriteLog "logs/rewriter.log"

猜你喜欢

转载自xiaolaogong.iteye.com/blog/1539104