Current purpose-achieved code
Rewriteengine Onrewritecond%{http_host} ^sell-meihualu.abc.com$ [Nc]rewriterule (. *) http://www\.abc\.com/sell/ meihualu/$1 [R=301,nc,l]
How to set sell to variable a
Meihualu set to Variable b
Realize
A-b.abc.com
Jump to the corresponding
www.abc.com/A/B/
Or there's no big God. php files can be resolved
I just learned not long
Reply to discussion (solution)
That's 301 jump, not pseudo-static.
The URL changes after the jump.
That's what I'm using.
Rewritecond%{http_host} ^ ([^\.] +). tool.net$
Rewriterule ^ (/?) (. *) $/users/%1/$2 [pt,l]
The URL of the blog.tool.net/index.php is positioned to users/blog/index.php
The URL does not change
In the same vein, your rules are written so you can do it.
Rewritecond%{http_host} ^ ([a-z]+)-([a-z]+). abc.com$ [NC]
Rewriterule (. *) http://www\.abc\.com/%1/%2/$1 [r=301,nc,l]
Not only sell-meihualu.abc.com such a level two domain name, right?
Thank the Moderator greatly reply.
There is more than one, I will write a single word to death!
That's 301 jump, not pseudo-static.
The URL changes after the jump.
That's what I'm using.
Rewritecond%{http_host} ^ ([^\.] +). tool.net$
Rewriterule ^ (/?) (. *) $/users/%1/$2 [pt,l]
The URL of the blog.tool.net/index.php is positioned to users/blog/index.php
The URL does not change
In the same vein, your rules are written so you can do it.
Rewritecond%{http_host} ^ ([a-z]+)-([a-z]+). abc.com$ [NC]
Rewriterule (. *) http://www\.abc\.com/%1/%2/$1 [r=301,nc,l]
Not only sell-meihualu.abc.com such a level two domain name, right?
If IIS is the Httpd.ini
How to modify?
# Protect Httpd.ini and Httpd.parse.errors files# from accessing through Httprewritecond Host: ([a-z0-9]+)-([a-z0-9]+] \.a Bc\.comrewriterule (. *) http://www\.abc\.com/$1/$2/$3 [I,RP]