我如何在网址的.htaccess上编写路由
-
/ frontend / web / country
-
/ api / web / country
-
/ backend / web / country
至
-
www.example.com/country
-
www.example.com/api/country
-
www.example.com/dashboard/country
父托管是www.abc.com,其中该域也托管在具有.htaccess的文件夹中
rewriteengine on
IndexIgnore /
RewriteBase /
ReWriteCond %{HTTP_HOST} example.com
ReWriteCond %{REQUEST_URI} !example/
ReWriteRule ^(.*)$ example/$1 [L]
ReWriteCond %{HTTP_HOST} abc.com
ReWriteCond %{REQUEST_URI} !abc/web/
ReWriteRule ^(.*)$ abc/web/$1 [L]
PS:www.abc.com也在使用Yii2