I want to write ISAPIRewrite without the www domain name to the domain name without the www domain name. comzb jumps to www. abc. note that the path after the domain name must be RewriteCondHost: ^ abc.com (. *) RewriteRule (. *) www.abc.com $1 [I, RP] in this case, I want to write the Rewrite method of ISAPI that does not contain the www domain name to the domain name with the www domain name.
I want to jump to http://www.abc.com/zb/
Note that the path after the domain name must also be included.
RewriteCond Host: ^ abc \. com (.*)
RewriteRule (. *) http \: // www \. abc \. com $1 [I, RP]
What's wrong with me?
------ Solution --------------------
Discussion
RewriteEngine on
RewriteCond % {http_host} ^ abc.com [NC]
RewriteRule ^ (. *) $ http://www.abc.com/#1 [L, R = 301]
------ Solution --------------------
Discussion
Reference:
It doesn't matter if it's not a directory.
Example:
RewriteCond % {HTTP_HOST} ^ 162100.com [NC]
RewriteRule ^ (. *) $ http://www.162100.com/#1 [L, R = 301]
This method is incorrect.