Reputation: 7213
I am redirecting users to a specific page based on some criteria. I know I can pass some url parameters indicating that there was a redirect. But is there any other way to tell it without turning to the url string?
Upvotes: 0
Views: 86
Reputation: 19852
If you're doing an actual redirect then yes, a redirect is a specific HTTP response code to the browser. Usually a HTTP 301 or 302 response code; these tell the browser to make another request to the server for the URL provided in the response.
This is different than using something like a Server.Transfer
or some sort of URL rewriting technique, which can make the "redirection" completely transparent to the browser.
Upvotes: 2
Reputation: 11910
Server.Transfer could be used to pass along a request without updating the Querystring, though this does carry some limitations as it isn't a perfect solution.
Upvotes: 1