|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#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 |
|
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
JavaScript... goto the programming section.
|
|
|
|
#3 |
|
Premium Member
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. |
|
|
|
|
|
#4 |
|
Member (12 bit)
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. |
|
|
|
|
|
#5 |
|
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. |
|
|
|
#6 |
|
Premium Member
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 |
|
|
|
|
|
#7 |
|
Member (12 bit)
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. |
|
|
|
|
|
#8 |
|
Staff
Premium Member
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 |
|
|
|
|
|
#9 |
|
Member (9 bit)
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|