2

I have an events page that I need to redirect or rewrite based on a value in the url.

The page generates urls like:

www.website.com/booking/?event=value1&date=value2&noa=value3

I would like this to redirect based on the first value regardless of what comes after so if event=new-event it would redirect to:

www.website.com/booking/value-1
Martin Tournoij
  • 26,737
  • 24
  • 105
  • 146
hancruz
  • 33
  • 3
  • We're happy to help you out if you get stuck, but this is not a "write htaccess rules for free"-site. Please share what you've got so far and explain where exactly you're stuck. In addition, your question is unclear as it's using "redirect" and "rewrite" interchangeably. [Those terms are **not** interchangeable!](http://stackoverflow.com/questions/12399505/understanding-difference-between-redirect-and-rewrite-htacess) – Martin Tournoij Mar 07 '16 at 05:56
  • I understand that this is not a "write htaccess rules for free" site but I really had nothing to add as all of my Googling has not helped my understanding and I don't think it is smart to mess around with ht access unless I am sure of result. As for using redirect and rewrite interchangeably - that was because I am unsure of which one would be better to use. – hancruz Mar 08 '16 at 00:15

1 Answers1

0

C# Code behind:

Resoponse.Redirect("<Your Base URL>/booking/" + Request.Params["event"]);
Koby Douek
  • 16,156
  • 19
  • 74
  • 103