开发者

Multilanguage PHP website URL filename change

I currently have a multilanguage PHP site on which开发者_如何学JAVA everything works fine. However, the "file name" does not change when "switching the language."

The URLs are like this:

www.site.com/br/article.pt.php

www.site.com/en/article.en.php

I want them to be:

www.site.com/br/meuartigo.pt.php

www.site.com/en/article.en.php

How can I do this? I could just do 301 redirects from

www.site.com/br/article.pt.php

to

www.site.com/br/meuartigo.pt.php

but I don't think that's the best way.


Your goal should be

www.site.com/br/meuartigo
www.site.com/en/article

That's the common format for 'SEO friendly urls'.

You can get a way to do it in the answer to this question: Simulate file structure with PHP

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜