How to redirect the french url of my site to show the french pages first?
-
I have replaced an old html site with WordPress site. I have also changed servers and DNS info today. I have created a bilingual site using WordPressMultilingual plugin. The French version of pages are in a folder /fr/. I am also using Permalinks so there is a rewrite rule in the .htaccess folder already. I need to update it but don’t know exactly how.
There are different domains pointing to the one site:
http://english.ca
http://english-french.ca
http://french.ca
http://french-english.caI need the french urls to show french content first. eg:
http://french.ca should point to http://french.ca/fr/
but right now it only points to http://english.ca (the English home page — very bad)AND each domain should still show the original domain name, so that visitors to the French domain would still see the French url. For example:
http://french.ca should point to http://french.ca/fr/ NOT point to http://english.ca/fr/I have three problems:
1) The French domains (french.ca and french-english.ca) need to point to the French homepage first (french.ca/fr/ and french-english.ca/fr/)
2) All four domain names need to stay as the original domain (whatever the user types in) and not switch to the default (english.ca). (ie. english-french.ca/contact should stay with the english-french.ca domain and when I click on another page, like “about” the english-french.ca domain should remain, and the new url will be english-french.ca/about
3) I want to write 301 redirects for all the old html pages (there are only about a dozen) to point to the new wordpress urls. (ie. index_fr.html needs to go to /fr/, contact.html needs to go to /contact)The old host had all the files in the root directory of english.ca with one .htaccess file that had the following:
RewriteEngine On RewriteCond %{HTTP_HOST} ^www.french [NC] RewriteRule ^/$ /index_fr.html
I changed it to this and it is not working:
RewriteEngine On RewriteCond %{HTTP_HOST} ^www.french [NC] RewriteRule ^/$ /fr/
I created three add-on domains with the new host on cpanel. I updated the DNS for all four domains to the new host. The old host was dedicated hosting and they won’t support me on this issue. Do I need to put a .htaccess file in each folder of the add-on domains? If so, what should be in them? And because I’m using Permalinks, there is already some code in the .htaccess file.
Any ideas?
- The topic ‘How to redirect the french url of my site to show the french pages first?’ is closed to new replies.