Three text parameters rewrite

Discuss practical ways rearrange URLs using mod_rewrite.

Three text parameters rewrite

Postby gairy » Sun Aug 17, 2008 10:03 am

Hi..

I was trying to mod rewrite three text parameters. But it's giving 500/404 error.

I want to try this

/handset=nokia-n95&networ=orange&plan=cheap

into

/nokia-n95/orange/cheap/

I've tried:

Code: Select all
RewriteEngine On
RewriteRule ^/?([a-zA-Z_]+)/?([a-zA-Z_]+)/?([a-zA-Z_]+)$ handset.php?MP=$1&NP=$2&FP=$3 [L]


and as suggested in

viewtopic.php?t=7191

but the problem still there.

Will appreciate your reply.
Thanks,
Gairy
gairy
 
Posts: 2
Joined: Sun Aug 17, 2008 9:52 am

Postby richardk » Mon Aug 18, 2008 4:52 pm

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^([^/]+)/?([^/]+)/?([^/]+)/?$ /handset.php?MP=$1&NP=$2&FP=$3 [L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 6 guests

cron