remove paramters from visible URL - WeOnlyDo Discussion board

remove paramters from visible URL (General questions)

by dirk, Thursday, November 26, 2009, 17:05 (5475 days ago)

Within my app I'm using the wodWebserver component.
It serves a page and within that page there is link (/saweb?uid=34&maintenance=true)
When you click on that link, I get the request, I can get the parameters (uid & maintenance) and act accordingly. And return the correctpage to the webbrowser BUT within the browser I see as URL /saweb?uid=34&maintenance=true, and I would like to see /saweb (without the parameters), how can this be done? Can I from within the 'server' somehow control this?

The way I found, but not sure if this is the most elegant way is:
within the requestDone event, after I've worked with all received paraters I do
User.Response.Redirect User.Request.Path & User.Request.PageName
exit sub


dirk

Re:

by wodDamir, Thursday, November 26, 2009, 17:58 (5475 days ago) @ dirk

Dirk,

Actually, that is the correct way to do it. The only other way is to return 301 or 302 (Moved or redirected) to browser, along with Location header, which will make browser do a request to URL specified in Location header. Something like this:

[code]User.Response.StatusCode = MovedPermanently
User.Response.Headers.Add Location , http://127.0.0.1/index2.htm [/code]

Both solutions should work however.

Regards,
Damba

Re:

by dirk, Thursday, November 26, 2009, 18:14 (5475 days ago) @ wodDamir

Thanks for the info