views:

54

answers:

2

Hello, how do I configure my .htaccess rewrite rules to accomodate GET requests?

Currently, /manager/page goes to: ?dept=manager&n=page however, some pages have additional GET reqs, and so this rule doesn't work:

RewriteRule ^([A-Za-z]+)/([A-Za-z]+)$ index.php?dept=$1&n=$2 [QSA]

I would need: ?dept=manager&n=page&id&etc=etc to go to: /manager/page/id/5/etc/6 however, not all pages present the same method of id input, IE. some pages used id, others catid, and others, bugid, so it's a bit difficult.

Thanks :)

UPDATED: END URL - id/5/etc/6

A: 

If your input methods are really that varied, you should use multiple RewriteRules for each different format.

MiffTheFox
Well, most of them are id however the forum is stuck with catid and threadid
Shamil
@ct2k7 Well, add rewrite rules for catid and threadid, then use the default rule for id.
MiffTheFox
what would they be? Spent an hour trying to figure it out :/ I'm getting useless nowadays :/
Shamil
A: 

You just need to sepcify a different rule.

RewriteCond ${HTTP_METHOD}  "GET"
RewriteRule --your rule--
Nick Berardi
How would I write the rule though?
Shamil