How do I Keep SEF URLs for new HTML website using 2 languages

58 Views Asked by At

I am working a new HTML pages which will replace a Joomla website on same domain. The Joomla site is using SEF URLs ex.

www.mydomain.com/en for home page in English
www.mydomain.com/about-us for about us page in English
www.mydomain.com/fr for home page in french

ans so on...

am using .htaccess to try to remove .html file extension (first 4 lines) and to keep the /en and /fr in the URLs (last line). Have moved all the site content in the /en sub folder and index-fr.html only in the /fr sub folder. The goal is that by default the visitor will reach the English version of the site. He can then shift to French version from there.

    RewriteEngine on 
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.html -f
    RewriteRule ^(.*)$ $1.html [NC,L]

    RedirectMatch ^/$ /en/
  1. The first part is not getting rid of the file extensions. I guess am missing something here.
  2. The redirection is working fine for EN but site layout is being broken when I go to www.mydomain.com/fr/index-fr.html (since I guess it's looking for CSS in the FR folder and I would prefer avoid duplicating CSS, scripts etc...)

I may be completely doing it the wrong way here. Any thoughts welcome.

0

There are 0 best solutions below