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.phpI want them to be:
www.site.com/br/meuartigo.pt.php www.site.com/en/article.en.phpHow 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
精彩评论