Idea:
http://abc.ccav.com rewrite to http://www.ccav.com/uid/abc
http://abc.ccav.com/article/index/index rewrite to http://www.ccav.com/article/index/index/uid/abc
http://abc.ccav.com/article/index/show/id/1 rewrite to http://www .ccav.com/article/index/show/uid/abc/id/1
http://abc.ccav.com/shop/index/index rewrite to http://www.ccav.com/shop/ index/index/uid/abc
http://abc.ccav.com/shop/index/show/id/1 rewrite to http://www.ccav.com/shop/index/show/uid/abc /id/1
I actually tried it a few times but failed, please give me some advice
Solved it myself
This is not rewriting, it should be called a jump, you can do 301, when $host = 'abc.ccav.com', ^/(.*)$ http://www.ccav.com/$1 permanent; Idea That’s it