11
synjones
Re: Xlangauge - dual content seo problem
  • 2008/11/10 8:04

  • synjones

  • Just popping in

  • Posts: 1

  • Since: 2008/11/10


I have gone through this forum but i can't get the correct answer to come out of this dual content seo problem.If you have some more information please suggest me it would help me.
==================================================
synjones
MLS

12
mrphilong
Re: Xlangauge - dual content seo problem
  • 2008/11/11 2:39

  • mrphilong

  • Quite a regular

  • Posts: 351

  • Since: 2006/7/14


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

13
Cozzie
Re: Xlangauge - dual content seo problem
  • 2008/11/11 3:28

  • Cozzie

  • Not too shy to talk

  • Posts: 133

  • Since: 2007/7/13


Hi mrphilong

Thanks a lot! Now its working

But I think i misunderstood what this rewrite can do.

It seems it changes the homepage only - is that right?

So other pages, say home.com/modules/newbb will not become home.com/en/modules/newbb, but the URL will remain the same in both languages for all such pages.

If this is so I guess this rewrite won't solve my seo problem because it only rewrites one page of the site - am i right?

Thanks again

Login

Who's Online

358 user(s) are online (295 user(s) are browsing Support Forums)


Members: 0


Guests: 358


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits