Hypens in domain name of .htaccess rewrite

女生的网名这么多〃 提交于 2019-12-13 07:14:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!