...

View Full Version : multilingual url rewrite



NinjaTurtle
11-15-2010, 04:14 PM
Hi,

How to redirect

http://www.abc.com/application/home/index.php?language=en&action=test

to

http://www.abc.com/application/en/home/test

by using htaccess?

The application might have few different languages, so if possible i do not want to hardcoded. how do i work it out using htaccess & php?

Thanks!

InterbredMonkey
11-16-2010, 04:41 PM
I think this is what you are looking for:


RewriteRule ^application/([^/\.]+)/home/([^/\.]+)/$ index.php?language=$1&action=$2

Basically the ([^/\.]+) bits take in the dynamic bits like the language and the action and the $1 and $2 put them back into the php $_GET array.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum