How to write a two level domain name jump level two directory pseudo-Static or PHP
Current purpose-achieved code
Rewriteengine on
Rewritecond%{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
------to solve the idea----------------------
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?