Results 1 to 10 of 21
09-08-2004, 03:16 PM #1denisGuest
Forwarding to another page/website. How?
The PHP method forwards the request at the side of the server
and is fairly seamless to the viewer. Put this in a file and call it
<i>index.php</i> then upload to www.domain.com/folder/:
<?php header("Location:http://www.domain.com/newfolder/"); ?>
The same effect can also be acheived by using a html meta refresh
which loads the page in the browser then refreshes it and
forwards it to the new location after a specified amount of
time. In this case we'll set it at zero seconds so the user does not
get a large delay. Put this in a file called index.html and upload
<html> <head> <title>redirecting...</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="refresh" content="0;URL=http://www.domain.com/new-folder/"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html>
In the above examples replace domain.com with the domain in
question and you can alter the URL's to suit your needs.
Last edited by denis; 09-08-2004 at 03:18 PM.
09-08-2004, 05:48 PM #2
- Join Date
- Dec 2003
09-08-2004, 06:03 PM #3denisGuest
Yes, that's right. We use this script for our forums too.
09-09-2004, 11:47 AM #4
- Join Date
- Mar 2004
You can use htaccess to do the same thing. I think cPanel uses htaccess to setup redirects.For reliable shared and reseller hosting, visit RadixHosting.
05-12-2005, 09:04 PM #5mrhahaGuest
05-13-2005, 03:33 AM #6denisGuestOriginally Posted by Pixelation
Create a .htaccess file (if does not exists) in your root directory.
Redirect permanent / http://www.new-url.com
I use this method very often.
05-15-2005, 03:33 AM #7JeffEDHGuest
Yes, I love doing redirects using .htaccess, guess its just what you're comfortable with!
05-15-2005, 09:33 AM #8
- Join Date
- Oct 2004
I think it is a lot better to do it with cpanel .The php method is cool too█ For Reliable and Affordable Web Hosting Packages, Please visit kooshin.com
█ KooshinDesigns.com- Version One Online
█ ArticleStorage.com- Your #1 Resource For Articles
█ 4Ulyrics.com -- The Lyrical Hideout, For Sale - Email me for details.
05-15-2005, 05:47 PM #9JeffEDHGuest
Yes you are probably right about cpanel. Coding in PHP is always cool, I love its redirects as well!
05-16-2005, 03:43 AM #10denisGuest