我的網站有文檔根〜/ public_html我試圖使用htaccess組織多域/子域重定向。miltiple域名/子域名使用htaccess
可能的重定向邏輯:如果發現域/子域目錄 - 執行重定向,否則拋出404錯誤。
可能的目錄結構:
public_html/
.htaccess (main redirect router)
public_html/
domain-1/
application/
public_html/
.htaccess
public_html/
domain-2/
application/
public_html/
.htaccess
public_html/
domain-3/
application/
public_html/
.htaccess
public_html/
subdomain-1.domain-1/
application/
public_html/
.htaccess
public_html/
subdomain-2.domain-1/
application/
public_html/
.htaccess
你的幫助,深深讚賞。 謝謝。
這就是VirtualHosts的優點。 https://httpd.apache.org/docs/2.2/en/vhosts/ – wmk
不幸的是,根據我的主機限制,我無法訪問apache設置。 – mosgaz
是否可以使用htaccess解決我的問題? – mosgaz