3
我的.htaccess文件存在問題。2域名(EN/FR)1 FTP重定向
我有兩個domaine名稱關聯到同一個FTP服務器。 一個domaine的名字是英文的,另一個是法文的。
現在,
- 當用戶鍵入english-hostname.com - >將其鏈接到index.html的 (經典)
- 當用戶鍵入french-hostname.com - >網站還鏈接了 相同的index.html
因此,這裏是我想擁有的一切:
- 當用戶鍵入english-hostname.com - >將其鏈接到index.html的
- 當用戶鍵入french-hostname.com - >它應該以 指數fr.html
的鏈接,我不t真的想要「url-fr.html」出現在url中,我創建了一個名爲「fr」的子文件夾,並且我在其中放置了法語索引。
這裏是我的.htaccess文件
RewriteEngine On
RewriteCond %{HTTP_HOST} ^french-hostname.com$ [NC]
RewriteRule ^(.*)$ http://www.french-hostanme.com/fr/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^english-hostanme.com$ [NC]
RewriteRule ^(.*)$ http://www.english-hostname.com/$1 [L,R=301]
我顯然不熟悉這些重定向/重寫規則,每次我試一下這段代碼打破我的網站時(錯誤500 ...)
請任何想法嗎?
謝謝!
斯坦