Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-15-2010, 04:14 PM   PM User | #1
NinjaTurtle
Regular Coder

 
Join Date: Jun 2002
Posts: 358
Thanks: 2
Thanked 0 Times in 0 Posts
NinjaTurtle is an unknown quantity at this point
multilingual url rewrite

Hi,

How to redirect

http://www.abc.com/application/home/...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!
__________________
Thanks.
=====================================================
From NinjaTurtle
++http://ohmygoh.blogspot.com|http://technology.ohmygoh.com++
NinjaTurtle is offline   Reply With Quote
Old 11-16-2010, 04:41 PM   PM User | #2
InterbredMonkey
New Coder

 
Join Date: Jan 2010
Location: In a dump
Posts: 64
Thanks: 9
Thanked 2 Times in 2 Posts
InterbredMonkey is an unknown quantity at this point
I think this is what you are looking for:

Code:
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.
InterbredMonkey is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:03 AM.


Advertisement
Log in to turn off these ads.