By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,870 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,870 IT Pros & Developers. It's quick & easy.

ASP response.redirect: absolute or relative addressing or both?

P: 1
Can you use relative addressing when using response.redirect; i.e something that would look like this
<% if session("superuser") <> true then response.redirect "../../../edit/logout.asp" %>
or does it have to be absolute addressing. For the life of me I canít find this explicitly written anywhere and I have been using file and virtual to include other pages so Iím curious to know how redirect works. I apologise if this question is silly for some but Iím not an asp programmer, I am just helping updating an existing asp site.

Thank you for your time
Aug 14 '07 #1
Share this Question
Share on Google+
1 Reply


ilearneditonline
Expert 100+
P: 130
Can you use relative addressing when using response.redirect; i.e something that would look like this
<% if session("superuser") <> true then response.redirect "../../../edit/logout.asp" %>
or does it have to be absolute addressing. For the life of me I canít find this explicitly written anywhere and I have been using file and virtual to include other pages so Iím curious to know how redirect works. I apologise if this question is silly for some but Iím not an asp programmer, I am just helping updating an existing asp site.

Thank you for your time
What is right and what is wrong, I can't say. But I prefer to use absolute. And the reason for that is that let's say i want to have a list of start pages. And I want to include that as my navigation on all pages. If you use relative, it is possible that more times than not you will end up redirecting to a page that doesn't exist. If on the other hand you use absolute, then you always go to where you are expecting.
Aug 14 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.