search

Home  >  Q&A  >  body text

apache - .htaccess setting problem

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

世界只因有你世界只因有你2750 days ago622

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你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

    reply
    0
  • Cancelreply