Is it possible to rewrite an url in different languages, so that you don't have to make separate folders or database tables with in a specific language?
Example:
This is a htaccess-rewritten url:
www.domain.com/animals/cats (originally http://www.domain.com/page.php?cat=animals&species=cats)
Let's say you want to put this url in french (for french visitors or search engine algorithms)
www.domain.com/animaux/chats
Is this possible the rename the french url without altering the original (english) url (being http://www.domain.com/page.php?cat=animals&species=cats)?
Thanks in advance.
Apache htaccess: rewrite url in different languages
Moderator: General Moderators
-
patrickmvi
- Forum Commoner
- Posts: 32
- Joined: Mon Jun 22, 2009 6:45 am
- Location: Fort Lauderdale, FL
Re: Apache htaccess: rewrite url in different languages
What you should do is create aliases in your DB for your category names. Then in your page.php script you could look up categories first by their actual name, then if nothing is found, search for any aliases and then the aliases would tell your script that it's supposed to go to animals instead of animaux.