.htaccess redirect or rewrite to default language url
Posted
by Saif Bechan
on Stack Overflow
See other posts from Stack Overflow
or by Saif Bechan
Published on 2010-05-11T17:20:50Z
Indexed on
2010/05/11
17:24 UTC
Read the original article
Hit count: 246
I have a website that is currently in Dutch. Now I want to make the website multi-language starting with English. I am not that good at .htaccess files and the information on the web is quite confusing.
The website I have now uses pretty urls, so all my urls look like this:
http://mydomain.com/about/info http://mydomain.com/about/contact
The code that I use for that is the following:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?rt=$1 [L,QSA]
</IfModule>
I really do not know what this means, esp the [L,QSA]. But it's ok, it works for now.
But now I want to add a default redirect to the code. So it becomes as follow
I assume all my old links http://mydomain.com/about/info will not work anymore, but that is a step I am willing to take.
Can someone please help me with this code. I have seen a lot of peaces of code, but I can not find the right one.
© Stack Overflow or respective owner