12
Hi Cozzie,
.htacess
RewriteEngine On
RewriteRule ^en/$ /index.php?lang=english [L]
RewriteRule ^$ /index.php?lang=vietnamese [L]
index.php just after include "mainfile.php";
// redirect to avoid double content
if(strpos(getenv('REQUEST_URI'), '/index.php?lang=english') === 0)
{
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.xoopsviet.org/en/");
}
elseif(strpos(getenv('REQUEST_URI'), '/index.php?lang=vietnamese') === 0)
{
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.xoopsviet.org");
}
elseif(strpos(getenv('REQUEST_URI'), '/index.php') === 0)
{
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.xoopsviet.org/");
}
Demo:
XoopsViet.Org
www.UcChau.Net
www.XoopsViet.Org