Hypens in domain name of .htaccess rewrite

2019-08-17 09:19发布

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?

0条回答
登录 后发表回答