I am creating a personal website, in which I will have only one index page with different languages. I have 3 links that call me by parameter to the index by passing the language:
<li class="lang"><a href="index.php?lang=en">EN</a></li>
<li class="lang"><a href="index.php?lang=es">ES</a></li>
<li class="lang"><a href="index.php?lang=ca">CA</a></li>
And I am creating a .htaccess file that according to the language that comes by parameter, add a / is / in or / ca to the end of the web name. Right now what I have in the .htaccess file is this:
RewriteEngine On
RewriteRule ^(.)?$ index.php?lang=en [L,QSA]
RewriteRule ^(es|en)?$ index.php?lang=$1 [L,QSA]
If I enter the name / is or / in o / ca redirects me well and shows me the web in that language, but if I click on the links on the page I see the
index.php?lang=es
I do not know if it's because I'm working on localhost, or that I have to change something in the rules, but even though I'm looking for it I have not managed to make it work.
Thanks