473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Response.Redirect and Apache Forward

Hi,

I've a VB .Net web app (for example foo) on an internal server. In the
intranet we can access this application like this :
http://myserver/foo/index.aspx.

Now we want to make this application available on the Internet. We 've
set up an Apache forwarding on our LAN and we can access the
application :

http://www.fooapp.com/index.aspx is OK

But there is a problem each time we are using a Response.Redirect in
our code (in a postback for example).

For example if we want to redirect to index2.aspx (using
Response.Redirect("index2.aspx"), which is a webform located in the
same directory than index.aspx it fails on the Internet with a 404
error code because the we are redirected to :

http://www.fooapp.com/foo/index2.aspx and not to
http://www.fooapp.com/index2.aspx

Note : when you try to do the same Response.Redirect in an ASP (and not
..Net) page :it is OK !!! No additionnal /foo!

Have you an idea? (other than using Server.Transfer, we want to keep a
"true" URL on the client browser)

Thanks for your answers

Lionel

Nov 19 '05 #1
1 3890
asp.net does more munging of the url then asp. it appends the base dir to
the url (to help you). this means in your redirect url is relative to the
domain, not the current page.

when you do Response.Redirect("index2.aspx") from
mysite.com/foo/mypage.aspx , asp.net actually sends

Location: /foo/index2.aspx

where asp sent

Location: Redirect: index2.aspx

you will have to hack redirect location yourself.

Response.RedirectRedirect("index2.aspx",false); // don't end yet
Response.RedirectLocation = "index2.aspx;"; // override asp.net location
Response.End();

or you could just send the header yourself.

-- bruce (sqlwork.com)


"Lionel" <ca******@hotmail.fr> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
Hi,

I've a VB .Net web app (for example foo) on an internal server. In the
intranet we can access this application like this :
http://myserver/foo/index.aspx.

Now we want to make this application available on the Internet. We 've
set up an Apache forwarding on our LAN and we can access the
application :

http://www.fooapp.com/index.aspx is OK

But there is a problem each time we are using a Response.Redirect in
our code (in a postback for example).

For example if we want to redirect to index2.aspx (using
Response.Redirect("index2.aspx"), which is a webform located in the
same directory than index.aspx it fails on the Internet with a 404
error code because the we are redirected to :

http://www.fooapp.com/foo/index2.aspx and not to
http://www.fooapp.com/index2.aspx

Note : when you try to do the same Response.Redirect in an ASP (and not
.Net) page :it is OK !!! No additionnal /foo!

Have you an idea? (other than using Server.Transfer, we want to keep a
"true" URL on the client browser)

Thanks for your answers

Lionel

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JDJones | last post by:
We are trying to set up a PHP page to handle server requests for individual web pages that we are moving to a new server. The part that complicates this procedure is that the files will not be...
3
by: Sean Berry | last post by:
Hi there. I am relativly new to Python CGI and need a question answered. I have made custom 404 error pages and have them in various web directories. I have not been able to figure out a way...
3
by: Bill | last post by:
I have a page that contains processed variables that I'd like to forward using the response.redirect method. However, because the response.redirect contains the page within "pagename.asp", I have...
1
by: Bill | last post by:
I'm trying to retain a value that I pass to a processing page. When the page is done processing, I use the response.redirect to forward to the page I started on, and i want that page to hold the...
3
by: ASP Yaboh | last post by:
Does Response.Redirect() make a roundtrip to the client to complete the redirect? Is there a method which keeps the redirection server-side (e.g. in JPS .Forward() moves the action to a new...
4
by: Bart op de grote markt | last post by:
Hello I have a website in php in which I have some kind of portal to external links that come from a database. When a user clicks on a link, "link.php" is called, does some stuff (e.g. adds 1...
11
by: Paul Furman | last post by:
I'm setting up credit card payment through authorize.net and they have the option to send a POST string back to my site once complete. I'm not sure how to proceed. They don't have much to read...
0
by: ponvijaya | last post by:
Hi all, I have one requirement in my project. I need to download a file from the server tot the client machine. And after downloading it , it should be redirected to another jsp file. The...
0
by: airezz80 | last post by:
Hi, I am trying to achieve the following: Webform1: has a button button1 and a listbox: listbox1 webform2: two listboxes The logic behind the button is to retrieve the records from a sql db...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.