Response Redirect Semicolon Problem

When I do the below code, ASP is taking out the semicolons and going to:

I need the semicolons to stay.  Please help.

url = ";mid=15664;rid=322;tid=3;ev=2;dt=3;ac=76;c=71;"
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

semi colons are invalid in the url,

why do you need them, maybe you can replace them with another character and convert them back at serverside?

what are they for?
or just use & if you want to seperate the variables, are they variables and valu key pairs?
sixdegreeAuthor Commented:
They're not invalid.  If you copy/paste it into your address browser it works perfectly fine.;mid=15664;rid=322;tid=3;ev=2;dt=3;ac=76;c=71;
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

sorry i didnt mean invalid, but if you parse them with asp they are converted.

why dont you try and wrap this around it.

sixdegreeAuthor Commented:
This is the page i'm working with:

it redirects using:

url = ";mid=15664;rid=322;tid=3;ev=2;dt=3;ac=76;c=71;"

Which doesn't work either.


url = "" & Server.URLEncode("cp.x;mid=15664;rid=322;tid=3;ev=2;dt=3;ac=76;c=71;")

This was a hard problem, and I think the problem is in "response.redirect" automatically running a urlencode.

When you use response.redirect what actually happens is a HTTP 302 response header is sent to the browser telling the browser that the web page has moved.  For quite a while browsers automatically redirects the user to the new location.  To the user it seems like the page redirect is done on the server side.  In anycase, if you simulate the http 302 response it solves your problem.

Here is the code:


url = ";mid=15664;rid=322;tid=3;ev=2;dt=3;ac=76;c=71;"

Response.Status = "302 Object Moved"
Response.AddHeader "Location", url
Response.Write "<HTML>"
Response.Write "<BODY>"
Response.Write "This file was moved to "
Response.Write "<A HREF=""" & url & """>here.<A>"
Response.Write "</BODY>"
Response.Write "</HTML>"


and if you want to, you could write your own function called ResponseRedirect(url) which would call that.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.