473,785 Members | 2,327 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP response.redire ct: absolute or relative addressing or both?

1 New Member
Can you use relative addressing when using response.redire ct; i.e something that would look like this
<% if session("superu ser") <> true then response.redire ct "../../../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 4140
ilearneditonline
130 Recognized Expert New Member
Can you use relative addressing when using response.redire ct; i.e something that would look like this
<% if session("superu ser") <> true then response.redire ct "../../../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
2910
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 my local web server in order to do work on it. I found that there is an include file that references images: <img src = "/images/Header.gif" What worked correctly on the production server breaks on mine because of the absolute address "/images". I removed the absolute address and changed...
3
1594
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 response.redirect from within my class I get this error message Server Error in '/Application' Application. ---------------------------------------------------------------------------- ----
0
1306
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 include the COM generated file A.h (from another ATL project A). The compiler interprets this and injects the command "import A.idl" into the idl for B. So far everything is okay. The problem is that when I build project B in debug, it references A.idl using the absolute path. When I build...
10
7931
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 the ASP.NET runtime to munge a session ID into the URL, in the format http://yourapplicationpath/(Session.SessionID)/... which saves numerous headaches when it comes to storing state across page requests and sessions.
1
2533
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 have e-commerce capability and will need to be SSL-encrypted. Thus, I assume I'll need to use absolute links to specifiy the https protocol (correct me if I'm wrong on that) Does ASP.NET handle an absolute link any different than a relative one? Will I have any problems maintaining session...
2
4897
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 header. For example '/test.aspx' becomes 'http://www.myserver.com/test.aspx'. We're not able to reproduce this on our machines. Does anyone know of a setting or configuration that would cause this behavior in Response.Redirect()? Thanks, Paul
6
3178
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 './' with make it absolute w.r.t to document root but I guess not? e.g., when I do include './Scripts/AddNav.php';
1
2133
by: bernie | last post by:
what is the difference between relative and absolute addressing?
18
2675
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 users) will have on their machine. BTW, Location: is supposed to take a fully qualified URL.
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10100
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4061
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.