tholo tholo - 1 year ago 94
PHP Question

Redirect with Dynamic Parameters in URL

I do not know how to format this question to be clear enough, so please bear with me. I will do my best.

Lets say I want to redirect one url to another, i.e: ==>

Now, let's say the first url has parameters
so it looks like:

and the values under name and email are dynamic ones.

Is there a way to make a script which will automatically know how to redirect this: ==>


Answer Source

You can use the following rule in site1/.htaccess :

RewriteEngine on

RewriteCond %{QUERY_STRING} name=.+&email=.+ [NC]
RewriteRule ^ [L,R]

This will redirect to

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download