472,353 Members | 976 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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

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
1 3964
ilearneditonline
130 Expert 100+
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

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

Similar topics

15
by: Nick K. | last post by:
I recently began maintenance work on a production web server that is located in the root directory of a web server. I moved this into a sub web on...
3
by: VapidGav | last post by:
Ok I am going a bit insane here. I have written a class which handles redirects to certain pages according to database settings. When I use the...
0
by: Jason Lawrence | last post by:
I have an attributed ATL project (call it B) that I am building with Microsoft Visual C++ .NET (55537-640-3684941- 18356). In the project I...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes...
1
by: Andre Ranieri | last post by:
I have a quick question - I'd just like to have confirmation to be sure. I'm building an ASP.NET corporate site for my employer, some of the pages...
2
by: Paul Bonfanti | last post by:
A customer of ours using .NET 2.0 on Win2003 is seeing relative URLs passed to Response.Redirect() being converted to absolute URLs in the Location...
6
by: Jon Slaughter | last post by:
do I have to prefix every absolute path with document root to get it to work? For some reason I thought that prefixing a path with '/' or './'...
1
by: bernie | last post by:
what is the difference between relative and absolute addressing?
18
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.