General RewriteRule for many undefined parameters in URL
Posted
by FedericoBiccheddu
on Stack Overflow
See other posts from Stack Overflow
or by FedericoBiccheddu
Published on 2010-04-16T23:25:54Z
Indexed on
2010/04/17
1:33 UTC
Read the original article
Hit count: 355
I'm trying to write a rule to make that one can generalize, since multiple pages to pass the values are different. Right now I could do:
RewriteRule ^forum/([^/]{1,255})/([\+]{1})/((([a-z]+)([_]{1})([a-zA-Z0-9]+)([/]?))+)$ forum.php?name=$1&$5=$7 [L]
To address such as:
Nome+del+Forum/+/page_1/action_do
Should return:
forum.php?name=Nome+del+Forum&page=1&action=do
Instead, take only the last parameter (in this case action=do):
forum.php?name=Nome+del+Forum&action=do
How can I fix? Thanks in advance!
© Stack Overflow or respective owner