我有幾個域擴展,我想重定向到特定頁面。 像example.de必須重定向到example.de/de/和example.fr到example.fr/fr/。正則表達式 - URL擴展重定向幫助
我該如何做到這一點?我是新來的正則表達式。
我有幾個域擴展,我想重定向到特定頁面。 像example.de必須重定向到example.de/de/和example.fr到example.fr/fr/。正則表達式 - URL擴展重定向幫助
我該如何做到這一點?我是新來的正則表達式。
您將編輯.htacess文件,並把像到:
RedirectMatch permanent example\.de/$ http://example.de/de
RedirectMatch permanent example\.fr/$ http://example.fr/fr
....
在哪裏做這種重定向?在服務器端代碼(什麼語言?),客戶端(JavaScript?)或Web服務器配置? –
最好.htaccess – priktop