codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Responce.redirect  flamee at 12:03 on Wednesday, April 28, 2004
 

AHHHGHGHHGHGHG HELP ME PLEASE!!!!

I need to make my page http://www.road-crossing-frog.co.uk
re-direct to http://road-crossing-frog.co.uk

i am trying to use

<%
response.redirect('http://www.road-crossing-frog.co.uk');
>%

but it doesn't work.
i need to tell the responce if the page address is http://www.road-crossing-frog.co.uk Then redirect to http://road-crossing-frog.co.uk

Can anyone help me with a script please?!!?!!?



  Re: Responce.redirect  arasaki1 at 15:51 on Thursday, April 29, 2004
 

I am fairly new to asp but maybe this will help.
<%
Response.Redirect "http://www.road-crossing-frog.co.uk"
%>
This is the way i set up all my redirects.

  Re: Responce.redirect  flamee at 15:55 on Thursday, April 29, 2004
 

I tried that but it didn't work, thanks anyway.
i managed to do what i wanted in the end tho..


<%

if left(request.servervariables("server_name"),3)<> "www" then
response.redirect "http://www.road-crossing-frog.co.uk"
end if

%>


  Re: Responce.redirect  reallyfreakedout at 10:22 on Thursday, May 06, 2004
 

For the Response.redirect to work at the start of your page you will ahve to include the following

<%@ Response.Buffer=True %>

It should work now

  Re: Responce.redirect  flamee at 10:26 on Thursday, May 06, 2004
 

where would i inculde <%@ Response.Buffer=True %> ??

<%
Response.Buffer=True
if left(request.servervariables("server_name"),3)<> "www" then
response.redirect "http://www.road-crossing-frog.co.uk"
end if

%>
?? would that do it?

Or

<%@ Response.Buffer=True %>
<%
if left(request.servervariables("server_name"),3)<> "www" then
response.redirect "http://www.road-crossing-frog.co.uk"
end if
%>

thanks =)

  Re: Responce.redirect  reallyfreakedout at 11:04 on Thursday, May 06, 2004
 

The second one will work, but I've never tried the first so I'm not sure whether it will, try it out though.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Print and print preview file on the website without using the File - Print on the IE
•  Re: ASP.NET web controls
•  Re: JavaSript Problem In Mac Safari Browser
•  Re: DHTML div positionning Problem
•  Convert script to NS6 compatible - Please Help!
•  Print .doc file from the website using System.Diagnostics.Process
•  Re: Fullscreen code
•  Re: iframe targeting
•  Excel n ASP


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005