General RewriteRule for many undefined parameters in URL
- by FedericoBiccheddu
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!