Redirect Page

D

David

I have attempted to redirect a non-secure page to a secure page however the
results i get are Page not Found rather than the credit card donation page i
seek. The server administrators tell my when they redirect by changin http to
https in the address line they get the secure page.

what am i doing wrong?
 
T

Thomas A. Rowe

How are you trying to do this?
How it this a FP related issue?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
T

Thomas A. Rowe

Try writing it as follows:

Response.Redirect https://www.anchoragerescue.org/Donation_Credit_Card.htm

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
T

Thomas A. Rowe

My method works!!!

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
C

clintonG

The earlier you learn how and why ASP requires and uses what is called the
"variant data type" the earlier you learn that the answers you have been
given may work but they are sloppy hacks and not the best to learn from and
the earlier the lightbulb(s) will light up helping you to internalize the
insights you will need to excel at ASP scripting.

' Mike's MD Webs...
Note that the variant data type required and used by ASP does not require
instantiating and initializing another object simply to pass a URL to the
Response object. Doing so imposed a penalty on the performance of your page.
Never use objects when they are not needed. That is, there was no need to
pass the URL to the Server object using its UrlEncode function. Furthermore,
try not to adopt Mike's coding style.

' poor convention and sloppy VBScript formatting...
Response.redirect
server.URLEncode("https://www.anchoragerescue.org/Donation_Credit_Card.htm")

' better convention using Pascal Case with correct VBScript formatting...
Response.Write( Server.UrlEncode("https://.... ") )

Rowe's example is even worse as it is relies on a sloppy hack. Just because
browsers have been developed to parse just about any slop amateurs throw at
the browser is not a reason to justify doing so. Customers, employers and
business partners have wised up. Slooppy coders cost them money imposing
their bad habits which cost money to maintain and update when that money is
better spent on wiser pursuits. Microsoft has announced for example that IE7
is clamping down on the slopsters and has developed IE7 so it will not parse
feeds that are not well formed.

Now after all that criticism is said and done all that you needed to do was
escape the URL using quotation marks as this following use case will prove
by simply putting the use case into an .asp file and requesting the file in
the browser.

<%
' best convention using Pascal Case with correct formatting...
Response.Redirect("https://partnering.one.microsoft.com/mcp/")
%>

Again, you should search for and learn about the "variant data type" which
will really help make it easier to understand how ASP functions. Work on
adopting an acceptable set of naming conventions and learn how to discipline
yourself to format your code correctly. It becomes critically important
when scripting with JavaScript and more advanced pursuits.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
 
T

Thomas A. Rowe

See:
http://www.codeave.com/ASP/code.asp?u_log=39
http://aspronline.com/learn/lessons/4/3.asp
http://www.topxml.com/asp/response_object_method_redirect.asp

Notice that ()s are not used in many examples

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
C

clintonG

That doesn't mean they weren't slooppy coders like some of us who can be
sloopy typists.
Reading slooppy articles is how I learned how to write slooppy code too.
Lucky for me
somebody kept slapping me upside the head.

<%= Clinton Gallagher
 
T

Thomas A. Rowe

How is it sloppy coding?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
M

Mike

I do not know if this will work for you, but here is a script that will
re-direct to another page.

Simply replace the http://web address to fit your needs.

Hope this helps ...

--------------------------------------------------------------------------------------
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- begin hiding JavaScript from old browsers
// define redirect function
// to use this script, change redirect2.htm to required destination
function redirect(){
parent.location.href="http://www.msn.com"
}
// End hiding JavaScript -->
</SCRIPT>
<TITLE>Simple Redirect Script</TITLE>
</HEAD>
<BODY BGCOLOR="#C0D0A1">
<P>
<P>
<P ALIGN=Center>
&nbsp;<BR>
&nbsp;<!-- change "nuke" to required destination --><P ALIGN=Center>
If you are not redirected to another page within 15 seconds, then please
<A href="http://www.msn.com">click here</A>. <SCRIPT LANGUAGE="JavaScript">
<!-- Hide script from old browsers
// set timeout to redirect after 10 seconds
setTimeout("redirect()",10000)
//--> </SCRIPT>
</BODY></HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top