redirect  
Author Message
Andie





PostPosted: 2003-8-18 21:52:00 Top

asp, redirect Hello.

How do I redirect a page back to the orginal sending page.

I have a script that checks to see if a user is logged in and if he.she
isn't then it redirects them to a loging page, one login has been checked
and process, how do I redirect them to the original page.

--
To reply, remove "TRASH" from email address

Thanks,

Andie


 
Adrian Forbes - MVP





PostPosted: 2003-8-18 22:10:00 Top

asp >> redirect On your page that checks the logon;

if NotLoggedOn
Response.Redirect "logon.asp?return=" &
Server.URLEncode(Request.ServerVariables ("SCRIPT_NAME"))
end if

In logon.asp;

...code to logon the user...
response.redirect Request("return")

That is the general idea anyway.


>-----Original Message-----
>Hello.
>
>How do I redirect a page back to the orginal sending page.
>
>I have a script that checks to see if a user is logged in
and if he.she
>isn't then it redirects them to a loging page, one login
has been checked
>and process, how do I redirect them to the original page.
>
>--
>To reply, remove "TRASH" from email address
>
>Thanks,
>
>Andie
>
>
>.
>
 
Randy Rahbar





PostPosted: 2003-8-18 22:13:00 Top

asp >> redirect > I have a script that checks to see if a user is logged in and if he.she
> isn't then it redirects them to a loging page, one login has been checked
> and process, how do I redirect them to the original page.

You could append the name of the page onto the redirect as a querystring.

Use request.servervariables("script_name") to get the name of the page
current page. It'd work something like this...

If UserNotLoggedOn
response.redirect "login.asp?r=" &
request.servervariables("script_name")
End If


 
 
Ken Cox [Microsoft MVP]





PostPosted: 2003-9-6 10:38:00 Top

asp >> redirect Not exactly sure what you're after, but are you looking for server.transfer?

Or perhaps this?

http://www.aspalliance.com/kenc/passval.aspx

Ken
MVP [ASP.NET]

--
Microsoft MVPs have a question for *you*: Are you patched against the Worm?
http://www.microsoft.com/security/security_bulletins/ms03-026.asp



"mozart" <email***@***.com> wrote in message
news:uWtFzV%email***@***.com...
It has some form to call an one page without being for response.redirect?



 
 
Bob Shelton





PostPosted: 2003-9-8 20:41:00 Top

asp >> redirect If I want to redirect a request to download a file that no exists to a web
page, what are your suggestions?

Bob Shelton


 
 
Steve Easton





PostPosted: 2003-9-8 21:00:00 Top

asp >> redirect If your host allows it, create a custom 404 or error page.
If the file is not found the custom page will appear.

hth


--
95isalive
This site is best viewed..................
..............................with a computer
"Bob Shelton" <email***@***.com> wrote in message
news:email***@***.com...
If I want to redirect a request to download a file that no exists to a web
page, what are your suggestions?

Bob Shelton



 
 
Bob Shelton





PostPosted: 2003-9-8 21:38:00 Top

asp >> redirect Thanks.

"Steve Easton" <email***@***.com> wrote in message
news:email***@***.com...
> If your host allows it, create a custom 404 or error page.
> If the file is not found the custom page will appear.
>
> hth
>
>
> --
> 95isalive
> This site is best viewed..................
> ..............................with a computer
> "Bob Shelton" <email***@***.com> wrote in message
> news:email***@***.com...
> If I want to redirect a request to download a file that no exists to a web
> page, what are your suggestions?
>
> Bob Shelton
>
>
>


 
 
Karen Wise





PostPosted: 2003-10-10 22:18:00 Top

asp >> redirect I am changing servers. How do I redirect to the new site
with minimum inconvenience to my visitors?

Thanks,

Karen
 
 
Steve Easton





PostPosted: 2003-10-10 22:21:00 Top

asp >> redirect By changing "servers," I assume you mean changing "hosts"
Your new host should give you new Domain Name Servers
to assign your domain too. After your domain has propagated
through the new servers, visitors will automatically be at
your "new" location. ( usually takes 48 hours to propagate )

hth


--
95isalive
This site is best viewed..................
..............................with a computer

"Karen Wise" <email***@***.com> wrote in message
news:002001c38f39$6e429130$email***@***.com...
I am changing servers. How do I redirect to the new site
with minimum inconvenience to my visitors?

Thanks,

Karen


 
 
Kevin Spencer





PostPosted: 2003-10-10 22:40:00 Top

asp >> redirect Hi Karen,

Assuming that you old domain is still there, you can add a META REFRESH tag
to each page that they might browse to, and replace the content in the page
with a message indicating that the site has moved. The META REFRESH tag goes
in the <head> section of the page, and looks like this:

<META HTTP-EQUIV="refresh"
content="5;URL=http://www.yoursite.com/newpage.htm">

The "content" attribute indicates (1) the number of seconds to delay, and
(2) the URL to redirect to. So, you can control how long your message will
be displayed.

A good practice is to include in the message on the page a hyperlink to the
URL being redirected to, in case their browser doesn't support redirects
(extremely rare, but remotely possible). A typical message might read
something like:

This page (or site if you prefer using the same URL and message in all
pages) has moved to (hyperlink). Please update your bookmarks. If your
browser doesn't support redirects, please click here to go to (hyperlink).

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Karen Wise" <email***@***.com> wrote in message
news:002001c38f39$6e429130$email***@***.com...
> I am changing servers. How do I redirect to the new site
> with minimum inconvenience to my visitors?
>
> Thanks,
>
> Karen


 
 
chris leeds





PostPosted: 2003-10-11 1:09:00 Top

asp >> redirect I've wondered, for search engine and people with JavaScript turned off, if
it wouldn't be better to use:
response.redirect
or
server.transfer
on the default page in the root folder. Of course this would require the
ability to have .asp pages on the server but wouldn't it be better?

"Kevin Spencer" <email***@***.com> wrote in message
news:email***@***.com...
> Hi Karen,
>
> Assuming that you old domain is still there, you can add a META REFRESH
tag
> to each page that they might browse to, and replace the content in the
page
> with a message indicating that the site has moved. The META REFRESH tag
goes
> in the <head> section of the page, and looks like this:
>
> <META HTTP-EQUIV="refresh"
> content="5;URL=http://www.yoursite.com/newpage.htm">
>
> The "content" attribute indicates (1) the number of seconds to delay, and
> (2) the URL to redirect to. So, you can control how long your message will
> be displayed.
>
> A good practice is to include in the message on the page a hyperlink to
the
> URL being redirected to, in case their browser doesn't support redirects
> (extremely rare, but remotely possible). A typical message might read
> something like:
>
> This page (or site if you prefer using the same URL and message in all
> pages) has moved to (hyperlink). Please update your bookmarks. If your
> browser doesn't support redirects, please click here to go to (hyperlink).
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> http://www.takempis.com
> Big Things are made up of
> Lots of Little Things.
>
> "Karen Wise" <email***@***.com> wrote in message
> news:002001c38f39$6e429130$email***@***.com...
> > I am changing servers. How do I redirect to the new site
> > with minimum inconvenience to my visitors?
> >
> > Thanks,
> >
> > Karen
>
>


 
 
Jim Cheshire





PostPosted: 2003-10-11 1:24:00 Top

asp >> redirect Response.Redirect is going to essentially do the same thing as a meta
redirect. (Incidentally, a META refresh does not require any scripting.)

Server.Transfer won't actually work in this scenario because the URL is
absolute. A Server.Transfer is also going to have its own drawbacks.
Because a Server.Transfer causes the server to serve page A when page B is
requested, the browser has no knowledge of the new page's URL and history
won't be appropriately updated, etc.

META refresh is probably the best bet.

--
Jim Cheshire
Jimco Add-ins
http://www.jimcoaddins.com
===================================
Co-author of Special Edition
Using Microsoft FrontPage 2003
Order it today!
http://sefp2003.frontpagelink.com



"chris leeds" <email***@***.com> wrote in message
news:%23%email***@***.com...
> I've wondered, for search engine and people with JavaScript turned off, if
> it wouldn't be better to use:
> response.redirect
> or
> server.transfer
> on the default page in the root folder. Of course this would require the
> ability to have .asp pages on the server but wouldn't it be better?
>
> "Kevin Spencer" <email***@***.com> wrote in message
> news:email***@***.com...
> > Hi Karen,
> >
> > Assuming that you old domain is still there, you can add a META REFRESH
> tag
> > to each page that they might browse to, and replace the content in the
> page
> > with a message indicating that the site has moved. The META REFRESH tag
> goes
> > in the <head> section of the page, and looks like this:
> >
> > <META HTTP-EQUIV="refresh"
> > content="5;URL=http://www.yoursite.com/newpage.htm">
> >
> > The "content" attribute indicates (1) the number of seconds to delay,
and
> > (2) the URL to redirect to. So, you can control how long your message
will
> > be displayed.
> >
> > A good practice is to include in the message on the page a hyperlink to
> the
> > URL being redirected to, in case their browser doesn't support redirects
> > (extremely rare, but remotely possible). A typical message might read
> > something like:
> >
> > This page (or site if you prefer using the same URL and message in all
> > pages) has moved to (hyperlink). Please update your bookmarks. If your
> > browser doesn't support redirects, please click here to go to
(hyperlink).
> >
> > --
> > HTH,
> >
> > Kevin Spencer
> > Microsoft MVP
> > .Net Developer
> > http://www.takempis.com
> > Big Things are made up of
> > Lots of Little Things.
> >
> > "Karen Wise" <email***@***.com> wrote in message
> > news:002001c38f39$6e429130$email***@***.com...
> > > I am changing servers. How do I redirect to the new site
> > > with minimum inconvenience to my visitors?
> > >
> > > Thanks,
> > >
> > > Karen
> >
> >
>
>


 
 
earl





PostPosted: 2003-10-22 18:54:00 Top

asp >> redirect How can I redirect a user using html ?




 
 
William Tasso





PostPosted: 2003-10-22 19:53:00 Top

asp >> redirect earl wrote:
> How can I redirect a user using html ?

<p>Please try our <a href="/interesting.html">interesting page</a>.</p>

--
William Tasso - http://WilliamTasso.com


 
 
dante





PostPosted: 2003-10-22 20:39:00 Top

asp >> redirect <html>
<head>
<title>Site moved...</title>

<meta http-equiv="refresh" content="5;URL=http://YOUR_NEW_SITE_ADDRESS">

</head>
<body>

YOUR_OLD_SITE_ADDRESS has moved to YOUR_NEW_SITE_ADDRESS

If your browser does not automatically redirect you in 5 seconds,
click <a href="http://YOUR_NEW_SITE_ADDRESS">here</a> to go to the new site.

</body>
</html>

Regards


"earl" <email***@***.com> wrote in message news:3f966275$email***@***.com...
> How can I redirect a user using html ?
>
>
>
>


 
 
rf





PostPosted: 2003-10-22 21:00:00 Top

asp >> redirect
"earl" <email***@***.com> wrote in message news:3f966275$email***@***.com...
> How can I redirect a user using html ?

Hmmm. This question is asked here at least every couple of days. Did you
look through the history? It is also covered quite extensivly in the FAQ's
published here and elsewhere.

Google,
http://www.google.com/search?q=redirect+a+web+page
gives some eight hundred thousand hits on this matter.

Google groups (the archive of all newsgroups)
http://groups.google.com.au/groups?q=redirect+a+web+page
while giving not as many hits (only fifty thousand or so) is probably
better.

The short answer is you can't. HTML does not "do" anything.

The long answer is that you can't. What happens client side (ie HTML) is
beyond your control.

Your solution lies server side.

http://allmyfaqs.com/ probably has some pointers for you as well.

Cheers
Richard.


 
 
gmcclary





PostPosted: 2003-10-22 23:28:00 Top

asp >> redirect "dante" <email***@***.com> wrote in message
news:0Uulb.13363$email***@***.com...
> <html>
> <head>
> <title>Site moved...</title>
>
> <meta http-equiv="refresh" content="5;URL=http://YOUR_NEW_SITE_ADDRESS">
>
> </head>
> <body>
>
> YOUR_OLD_SITE_ADDRESS has moved to YOUR_NEW_SITE_ADDRESS
>
> If your browser does not automatically redirect you in 5 seconds,
> click <a href="http://YOUR_NEW_SITE_ADDRESS">here</a> to go to the new
site.
>
> </body>
> </html>
>
> Regards
>
>
> "earl" <email***@***.com> wrote in message news:3f966275$email***@***.com...
> > How can I redirect a user using html ?
> >
> >
> >
> >
>

This is a VERY bad idea.... for two reasons.
First: what if your visiter does not want to go there? You send them where
they do not want to go, then they have to use their back button.... the back
button returns them to your 're-direct page' and they have five seconds
before you send them again to where they don't want to go....
result, you have an irritated visitor who kills their browser to get out of
your 're-direct' trap and swears on their mother's grave they will never
visit your site again.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Second: see above.
Best to tell them the reason you want them to go there....


 
 
joao66br





PostPosted: 2003-10-25 22:54:00 Top

asp >> redirect
Hi there people,

I'm looking for a function that will redirect a browser to another page
after a PHP scrip has run. I tried serching for it in the doc but found
nothing. It shall be similar to Tcl's "ns_returnredirect".
Thanx.

Joao Penna Andrade
Undergraduate, Mechanical Engineering
UNICAMP, Brazil
 
 
dan.liu





PostPosted: 2003-10-28 4:26:00 Top

asp >> redirect Hi all,
Has anyone used 'Module mod_rewrite URL Rewriting Engine'?
I need to do a redirect from
http://url1/cgi-bin/mapserv?&map=/dir1/county.map
to
http://url2/cgi-bin/mapserv?&map=/dir2/county.map

But it is not working. Does somebody know why?
Thanks in Advance.
Dan

 
 
alain.dhaene





PostPosted: 2003-10-30 3:07:00 Top

asp >> redirect Hi,

Is there in php something as a redirect to another page like in asp?

e.g

if(choice==1) response.redirect("page.php");
response.redirect("page2.php");

I have search in the manuel, but the only thing I find is something like
header("Location: registratie.html");

But I guess it's wrong because header information is already send.


Alain