Reply

 

LinkBack Thread Tools Rate Thread
Old 09-08-2004, 04:16 PM   #1 (permalink)
denis
Guest
 
Posts: n/a
Question Forwarding to another page/website. How?

Simple methods:

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/:

Code:
<?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
to www.domain.com/folder/:

Code:
<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 04:18 PM.
  Reply With Quote
Old 09-08-2004, 06:48 PM   #2 (permalink)
WHC Administrator
 
Join Date: Dec 2003
Posts: 1,372
This is how http://webhostingchat.com/froum/ Works
__________________
BannersWorld Professional Banner Design
DataCenterTalk Rate, review and Discuss about datacenters.
.
whcdavid is offline   Reply With Quote
Old 09-08-2004, 07:03 PM   #3 (permalink)
denis
Guest
 
Posts: n/a
Yes, that's right. We use this script for our forums too.
  Reply With Quote
Old 09-09-2004, 12:47 PM   #4 (permalink)
WHC Administrator
 
Join Date: Mar 2004
Posts: 809
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.
Pixelation is offline   Reply With Quote
Old 05-12-2005, 10:04 PM   #5 (permalink)
mrhaha
Guest
 
Posts: n/a
ok.. thaknsss
  Reply With Quote
Old 05-13-2005, 04:33 AM   #6 (permalink)
denis
Guest
 
Posts: n/a
Quote:
Originally Posted by Pixelation
You can use htaccess to do the same thing. I think cPanel uses htaccess to setup redirects.
Yes, that's true! This is also a Search Engine Friendly method for
webpage redirection:

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.
  Reply With Quote
Old 05-15-2005, 04:33 AM   #7 (permalink)
JeffEDH
Guest
 
Posts: n/a
Yes, I love doing redirects using .htaccess, guess its just what you're comfortable with!
  Reply With Quote
Old 05-15-2005, 10:33 AM   #8 (permalink)
WHC Administrator
 
Join Date: Oct 2004
Location: http://kooshin.com
Posts: 4,195
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.
kooshin.com is offline   Reply With Quote
Old 05-15-2005, 06:47 PM   #9 (permalink)
JeffEDH
Guest
 
Posts: n/a
Yes you are probably right about cpanel. Coding in PHP is always cool, I love its redirects as well!
  Reply With Quote
Old 05-16-2005, 04:43 AM   #10 (permalink)
denis
Guest
 
Posts: n/a
Quote:
Originally Posted by kooshin.com
I think it is a lot better to do it with cpanel .The php method is cool too
There is no difference.
cPanel uses the same method:
Quote:
Redirect permanent / http://www.new-url.com
You just create this field via cPanel.
  Reply With Quote
Reply

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


All times are GMT -4. The time now is 10:06 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0