0

How can i write routing on .htaccess of the urls of

  1. /frontend/web/country
  2. /api/web/country
  3. /backend/web/country

TO

  1. www.example.com/country
  2. www.example.com/api/country
  3. www.example.com/dashboard/country

the parent hosting is www.abc.com where this domain is also hosted with in the folder having .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 is also using Yii2

Ahad
  • 355
  • 2
  • 12
  • Check this answer it will help you http://stackoverflow.com/a/28119343/1635676 – Touqeer Shafi May 25 '15 at 08:07
  • @TouqeerShafi this is not work for me .... may be this is the issue that my parent hosting is www.abc.com where www.example.com is also hosted in the folder ... see the edit post – Ahad May 26 '15 at 07:04

0 Answers0