问题
the following doesn't work in my .htaccess file... Does it have something to do with the hyphen in the domain name?
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?.*.domain-name.com$ [NC]
RewriteCond %{REQUEST_URI} !^/Accounts/2/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /Accounts/2/$1 [L]
RewriteCond %{HTTP_HOST} ^(www.)?.*.domain-name.com$ [NC]
RewriteRule ^(/)?$ Accounts/2/ [L]
any ideas?
来源:https://stackoverflow.com/questions/9982476/hypens-in-domain-name-of-htaccess-rewrite