Jump to content

mod_rewrite AND query string?


c0nfus3d1

Recommended Posts

I have the following in my .htaccess:

 

RewriteRule ^category/([^/\.]+)/([^/\.]+) /category.php?id=$1&cat=$2 [NC]

 

this allows me to link domain.com/category/5/5 that forwards to category.php?id=5&cat=5

 

I would like to link domain.com/category/5/5?q=query&s=somethignelse and have it forward to category.php?id=5&cat=5&q=query&s=somethingelse

 

the rewrite rule works for page urls, but there are a few cases that i need to pass further variables to the url... is this possible?

Link to comment
https://forums.phpfreaks.com/topic/254574-mod_rewrite-and-query-string/
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.