Jump to content

General RewriteRule for many undefined parameters in URL


FedericoBiccheddu
 Share

Recommended Posts

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:

RewriteCond %{QUERY_STRING} ^(.*)$RewriteRule ^forum/([^/]{1,255})/([a-z]+)([:]{1})([a-zA-Z0-9]+)	viewforum.php?name=$1&$2=$4&%1 [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 first parameter (in this case page=1):

forum.php?name=Nome+del+Forum&page=1

How can I fix? Thanks in advance!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...