Go Back   PCMech Forums > Help & Discussion > Internet, Web Applications, & The Cloud

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 05-17-2001, 06:54 AM   #1
Member (6 bit)
 
Join Date: Feb 2001
Posts: 43
Redirect to new URL

Hi,

How can I automatically transfer someone to a new URL if they go to an old URL?

Thanks
Digger is offline   Reply With Quote
Old 05-17-2001, 07:52 AM   #2
MITotaku
Guest
 
Posts: n/a
JavaScript... goto the programming section.
  Reply With Quote
Old 05-17-2001, 11:03 AM   #3
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
Javascript is a way .. if u like going about things the long arduous way, like trying to pop a pimple with dynamite

Use the META REFRESH tag in the HEAD tag.

Something like:
.
.
<HEAD>
.
.
<META HTTP-EQUIV="Refresh" Content="30; URL=http://www.xyz.com/newpage.html">
.
.</HEAD>

Here:
30=time in seconds where u can display a message on the old URL
and URL=the new page.

HTH

Last edited by Statica; 05-17-2001 at 11:06 AM.
Statica is offline   Reply With Quote
Old 05-17-2001, 01:44 PM   #4
Member (12 bit)
 
Paul Victorey's Avatar
 
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
Javascript also has the disadvantage that people can disable it. I agree with using meta refresh.
__________________
Paul M. Victorey
------------------
I am not responsible for any problems that may arise as a result of following my advice. This includes, but is not limited to, computer failure, loss of data, nuclear war, famine, boils, no clean laundry, your daughter running off with a biker gang, or armageddon. Take my advice at your own risk.
Paul Victorey is offline   Reply With Quote
Old 05-17-2001, 02:50 PM   #5
MITotaku
Guest
 
Posts: n/a
you can use Perl too... but your host has to support it, and let you use CGI.

Sorry about the refferal guys, was just trying to give the programming section more traffic.
  Reply With Quote
Old 05-17-2001, 03:17 PM   #6
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
Traffic isnt important here .. its giving our friends who visit here the correct information with the L-E-A-S-T amt of hassle to them. The idea is to put yourself in someone else's shoes, ask a doubt and expect an answer that is to the point and is the right one to the best of someone else's ability. However other than that, your post was good at perhaps openning up more alternatives and possibilities to accomplishing tasks.

Cheers
Statica is offline   Reply With Quote
Old 05-17-2001, 05:17 PM   #7
Member (12 bit)
 
Paul Victorey's Avatar
 
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
Also, you could use an .htaccess file to make the directory use another URL. For example, if the user were to go to:

www.old.server.com/directory/
you could make it display a file on another server. Kinda nice at times, too.

But the best method (most versatile) would be meta files. CGI would probably be second best only because you'd need CGI installed and the setup is more complicated; with CGI you could easily make it generate an HTTP/301 (permanently moved) top redirect.
Paul Victorey is offline   Reply With Quote
Old 05-17-2001, 05:25 PM   #8
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Learned a long time ago simplest is best. The question was how do I redirect. Pretty simple and always works using the META tag. Pretty simple in JS but doesn't always work. More complicated and doesn't always work in PERL.

Remind me never to ask what time it is. I would get answers like this:
-Well you see when the big hand comes over here and the little hand comes over here, then it will be so and so.
-Or first we have to tell you how the watch works. You must understand the way a watch works before I can tell you the time.
-Or what difference does it make what time it is any?
-Or I am going to move this post out of the time telling forum into the watch making forum.

Remember the KISS principle:
Keep It Simple Stupid
mairving is offline   Reply With Quote
Old 05-18-2001, 11:44 AM   #9
Member (9 bit)
 
Great_One's Avatar
 
Join Date: May 2000
Location: Lexington, Michigan
Posts: 353
hehe

do you want your time in gmt or utc form?
__________________
Certifiable
===========================================

Cisco CCNA,CCDA
CompTIA A+, Network+,Inet+,Security+
CIW Associate
IBM AIX certified
IBM Certified Specialist - p5 and pSeries Administration and Support for AIX 5L V5.3
IBM Certified Systems Expert - p5 and pSeries Enterprise Technical Support AIX 5L V5.3
Great_One is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:29 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2