2015-05-16 90 views
0

我有一個Joomla網站example.com和一個子目錄support.example.com許多URL鏈接到一個頁面

我想給我的客戶一個唯一的URL來查看將會是support.example.com/customer1support.example.com/customer2等內容。

我想要的是,無論我有多少客戶網址,它都會自動指向support.example.com,這將提示用戶輸入用戶名和密碼。我知道我可以在每個目錄中都有一個重定向,但我不想爲每個客戶設置一個物理目錄,這更像是一個別名。另外請注意,我有我的託管1and1英國,我不認爲我可以改變httpd.conf文件。

+0

我不能完全肯定我得到它,但是你可以使用onAfterLogin事件的插件將它們發送到哪裏你要。 – Elin

回答

0

您可以使用URL重寫來完成。它可以轉化

support.yourdomain.com/customer1/somefile.html 
support.yourdomain.com/customer2/somefile.html 

support.yourdomain.com/help/somefile.html 

更妙的是,它可以做這樣的事情:

support.yourdomain.com/customer1/somefile.html 
support.yourdomain.com/customer2/somefile.html 

support.yourdomain.com/help/findhelp.php?customer=customer1&file=somefile.html 
support.yourdomain.com/help/findhelp.php?customer=customer2&file=somefile.html 
+0

只是出於好奇,有沒有指向這樣的網址重寫呢,還是隻是審美?查詢字符串的版本有什麼問題? – bytesized

+1

查詢字符串版本沒有問題。但有理由使用其他格式。嘗試搜索「搜索引擎友好的URL」。這個原始問題也是一個很好的用戶案例。 – Tim3880

相關問題