Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > navigate from a regular page to a secured page

Reply
Thread Tools

navigate from a regular page to a secured page

 
 
c676228
Guest
Posts: n/a
 
      11-29-2007
Hi all,

What is the best way to lead customer from a regular page to a secured page?
Regularly, we use absolute path. say first ,a customer is on this regular
page for general information: http://xxxdomain.com/index.html, then customer
decides to buy something from our site. Then our program will provide an
absolute path like this: https://xxxdomain.com/buy.asp.

Recently I am doing migration and feel that the absolute path is not
convenient for program migration and domain merge. So I am wodering if there
is any other way to do it? any suggestions and comments?
--
Betty
 
Reply With Quote
 
 
 
 
Anthony Jones
Guest
Posts: n/a
 
      11-29-2007
"c676228" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> What is the best way to lead customer from a regular page to a secured

page?
> Regularly, we use absolute path. say first ,a customer is on this regular
> page for general information: http://xxxdomain.com/index.html, then

customer
> decides to buy something from our site. Then our program will provide an
> absolute path like this: https://xxxdomain.com/buy.asp.
>
> Recently I am doing migration and feel that the absolute path is not
> convenient for program migration and domain merge. So I am wodering if

there
> is any other way to do it? any suggestions and comments?



Since the start of the path changes from http to https what the client uses
has to be an absolute path.

It's a little bit awkard to do this in a html file since it gets no help
server side.
If you had a default.asp instead of index.html then :-

Dim sSecureBase
sSecureBase = "https://" & Request.ServerVariables("SERVER_NAME")

>%


<a href="<%=sSecureBase%>/buy.asp"> ... </a>


If you have a lot of HTML that you don't want to change then you could leave
buy.asp available as http://xxxdomain.com/buy.asp and use this code in the
top :-

If Request.ServerVariable("HTTPS") = "OFF" Then
'Channel not secure
Response.Redirect "https://" & _
Request.ServerVariables("SERVER_NAME") & _
Request.ServerVariables("UNENCODED_URL")
Response.End
End If

You place this code in its own .asp file then include it in all ASP pages
that should be secure.

--
Anthony Jones - MVP ASP/ASP.NET


 
Reply With Quote
 
 
 
 
c676228
Guest
Posts: n/a
 
      11-30-2007
Hi Anthony,
Thank you so much for your response. I will take your second suggestion
since we have separated person to develop marketing content without any
knowledge about asp. With this piece of code, we can take care of any third
party agents who link to our sale processes using http.

Sincerely
--
Betty


"Anthony Jones" wrote:

> "c676228" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi all,
> >
> > What is the best way to lead customer from a regular page to a secured

> page?
> > Regularly, we use absolute path. say first ,a customer is on this regular
> > page for general information: http://xxxdomain.com/index.html, then

> customer
> > decides to buy something from our site. Then our program will provide an
> > absolute path like this: https://xxxdomain.com/buy.asp.
> >
> > Recently I am doing migration and feel that the absolute path is not
> > convenient for program migration and domain merge. So I am wodering if

> there
> > is any other way to do it? any suggestions and comments?

>
>
> Since the start of the path changes from http to https what the client uses
> has to be an absolute path.
>
> It's a little bit awkard to do this in a html file since it gets no help
> server side.
> If you had a default.asp instead of index.html then :-
>
> Dim sSecureBase
> sSecureBase = "https://" & Request.ServerVariables("SERVER_NAME")
>
> >%

>
> <a href="<%=sSecureBase%>/buy.asp"> ... </a>
>
>
> If you have a lot of HTML that you don't want to change then you could leave
> buy.asp available as http://xxxdomain.com/buy.asp and use this code in the
> top :-
>
> If Request.ServerVariable("HTTPS") = "OFF" Then
> 'Channel not secure
> Response.Redirect "https://" & _
> Request.ServerVariables("SERVER_NAME") & _
> Request.ServerVariables("UNENCODED_URL")
> Response.End
> End If
>
> You place this code in its own .asp file then include it in all ASP pages
> that should be secure.
>
> --
> Anthony Jones - MVP ASP/ASP.NET
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Normal setup for Web page, web service, firewall secured database? redwoodtwig@gmail.com ASP .Net Security 0 05-12-2008 02:48 PM
HTTPS : Secured and non secured item with absolute path trihanhcie@gmail.com ASP .Net 1 05-15-2006 01:24 PM
Mixing secured (HTTPS) and non-secured (HTTP) content in the samepage Daniel Frechette Javascript 2 04-10-2006 01:00 AM
Page.Navigate anonymous ASP .Net 1 11-27-2003 04:00 PM
Re: Need to delete a file when user navigate away from the page Mark Fitzpatrick ASP .Net 0 06-25-2003 07:34 PM



Advertisments