0
上我有兩個結構域:使用重寫引擎路由多個域到不同的路徑中的一個服務器
domain1.com
domain2.com
我已經一個Apache 2服務器,與文檔根/svr.
我想以下發生:
domain1.com
路線的/svr/examplepath/thisisadir/param/domain1
- 等效條路線的
/svr/examplepath/thisisadir/param/domain2
相當於我一直在使用與RewriteEngine敘述一個.htaccess
在網站,可爲每個主機使用虛擬主機的聲明和簡單地使用301個重定向試圖/svr,
。但是,我不能使用簡單的301,因爲用戶在他們的瀏覽器中仍然應該看到domain1.com
。
I.e. domain1.com/about-this-site
應映射到/svr/examplepath/thisisadir/param/domain1/about-this-site.
我不能得到RewriteEngine將主機名路由到其各自的端點,任何意見將不勝感激。我目前正在嘗試在服務器根目錄中的.htaccess
中使用HTTP_HOST
,但重寫規則仍未生效。
Ilmiont