RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_\/]+)$ index.php/$1 [L]
Currently use the above statement to abbreviate xxx.com/index.php/abc as xxx.com/abc
Now I want to use abc.xxx.com to also access xxx.com/index.php/abc on this basis. How should I write it?
PS: I have resolved the ip of abc.xxx.com
我想大声告诉你2017-05-16 17:07:05
RewriteCond %{REQUEST_HOST} (abc).xxx.com
RewriteRule ^(.*)$ index.php/%1 [L]
I just happened to be writing this recently, please use %1