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"

你可能感兴趣的:(rewrite)