.htaccess - 2 domain name (EN/FR) 1 FTP redirection -
I have a problem with my .htaccess file.
I have to associate two domain name names. The same FTP server is a domain name in English and the second is in French.
For now,
- If the user types - english-hostname.com -> it links to index.html (classic)
- If the user type french-hostname.com -> this is linked to the same index.html
Here's what I would like to do:
- If the user type-- hostname.com -> this links to index.html
- If the user type french-hostname.com -> this should be a link to the index-frame. Html
I really do not want "index-fr.htm L "appears in the URL, I have created a subfolder named" FR "and I have put a French index in it.
Here is my .htaccess file
RewriteCond% RewriteEngine turned on {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]
I'm not quite familiar with these redirection / rewriting rules, e
thanks!
STAN
One for a better organization Place each version in the dedicated folder. After that, you need additional conditions to properly redirect your domain:?!
RewriteCond% RewriteEngine at {HTTP_HOST} (www.) English-hostname.com $ RewriteCond% {REQUEST_URI} ^ / hi / RewriteCond% {REQUEST_FILENAME}! -f RewriteCond% {REQUEST_FILENAME}! -d RewriteRule ^ (. *) $ / En / $ 1 RewriteCond% {HTTP_HOST} (www.)? French-hostname.com $ RewriteCond% {} REQUEST_URI! ^ / Fr / RewriteCond% {REQUEST_FILENAME}! -f RewriteCond% {REQUEST_FILENAME}! -d RewriteRule ^ (. *) $ / Fr / $ 1
Keep in mind that is still accessible and in contrast.
Comments
Post a Comment