Jump to content

ReWrite Help


Canman2005

Recommended Posts

Hi everyone

 

I am trying to ReWrite a URL and this is my first time trying to do something like this.

 

Basically I have the following URL

 

www.domain.com/results.php?q=iphone&type1[]=hardware&type1[]=software&type2[]=blue&type2[]=white&type2[]=red

 

that I want to rewrite to

 

www.domain.com/find/iphone/type1/hardware/software/type2/blue/white/red/

 

i've been playing around with

 

RewriteRule ^find/([^/]+)/([^/]+)/ results.php?type1[]=$1&type2[]=$2 [QSA,L]

 

but i'm just making it worse and cannot seem to find the correct way of doing it.

 

thanks very much

 

ed

Link to comment
https://forums.phpfreaks.com/topic/196702-rewrite-help/
Share on other sites

Nope, it could change and there could be more

 

So it could be

 

results.php?q=iphone&type1[]=hardware&type1[]=software&type2[]=blue&type2[]=white&type2[]=red

 

or

 

results.php?q=iphone&type1[]=hardware&type2[]=blue&type2[]=white

 

any help would be great

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/196702-rewrite-help/#findComment-1034074
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.