Welcome Guest ( Log In | Register )

Welcome Guest

Welcome to TutorialFx.com. As a guest, you are restricted from accessing all areas of the forum, including the ability to show off your artworks - such as sigs or templates - in our gallery, request support for tutorials, or talk with other members from all around the world.

Registration is free, and takes no more than 2 minutes to complete. Becoming a member will also allow you to view every section of the forum, and unlock hidden sections, such as SOTW Competitions, Request sections, Renders and Support. Thanks, and enjoy your time at TutorialFx.com!


 
Reply to this topicStart new topic
Redirect to another page instantly, Using a simple PHP code
Ghost
post Feb 13 2005, 01:54 PM
Post #1



Administrator
*****

Group: Admin
Posts: 5,720
Joined: 12-February 05
From: Australia
Member No.: 1


This tutorial will teach you how to redirect one page to another instantly. This is the code that TutorialFx uses to redirect its users.

Whenever someone types in www.tutorialfx.com, it will auto-matically bring them to tutorialfx.com/forums.

If you would like to make one the same as ours, make a new document, and name it index.php. Next, copy and paste the following code.

CODE
<?PHP
header("Location: http://www.site.com");
?>

Change www.site.com to the site that you want to redirect to.

Hope this helps victory.gif


--------------------

Adobe Photoshop Tutorials - IPBForumSkins
#InternetExplorer { display: properly_please; }
Go to the top of the page
 
+Quote Post
ph3r 985
post Feb 23 2005, 06:51 AM
Post #2



d00m 0f 7h3 fuTur3
**

Group: Members
Posts: 221
Joined: 23-February 05
From: Tewkbury, MA
Member No.: 89


thx dude ive ben wondering how to do that. IN my php books i couldnt find it but now i can thx alot. =).


--------------------

IPB Image

IPB Image

Gmail: d4v301337@gmail.com
AIM: xsk8rdavex
Runescape Name: Narutodave10
THAW ONLINE NAME: [P0g]*dav3*
Go to the top of the page
 
+Quote Post
Ghost
post Feb 23 2005, 03:28 PM
Post #3



Administrator
*****

Group: Admin
Posts: 5,720
Joined: 12-February 05
From: Australia
Member No.: 1


No problem smile.gif Glad it helped.


--------------------

Adobe Photoshop Tutorials - IPBForumSkins
#InternetExplorer { display: properly_please; }
Go to the top of the page
 
+Quote Post
Escrima
post Jul 5 2005, 05:22 AM
Post #4



Your Friendly Mod
*****

Group: Members
Posts: 1,695
Joined: 19-February 05
From: United Kingdom
Member No.: 45


Most useful tutorial on the site. cool.gif Used it 9 times now. lol.


--------------------
Go to the top of the page
 
+Quote Post
SNIP3R
post Aug 16 2005, 12:57 AM
Post #5



Newbie
*

Group: Members
Posts: 7
Joined: 27-July 05
Member No.: 1,353


It didnt work? i made a new post and posted the link in the box like this
<?PHP
header("Location: http://www.chaosgfx.com");
?>


--------------------
user posted image
Go to the top of the page
 
+Quote Post
matrix0978
post Aug 16 2005, 06:52 AM
Post #6



1337 GuRu
**

Group: Members
Posts: 251
Joined: 20-July 05
From: Southwest of the U.S.
Member No.: 1,282


Did you do the .php extention instead of .html?


--------------------
Web Designer,Developer//Web Marketing

www.spencerskeen.com
Go to the top of the page
 
+Quote Post
dRk
post Feb 6 2006, 12:06 AM
Post #7



Newbie
*

Group: Members
Posts: 1
Joined: 5-February 06
Member No.: 3,268


also if you ever want to delay the redirect:
CODE

header("Refresh: 5; URL=http://google.com");

replace 5 with the number of seconds to delay, and http://google.com with where you want to redirect to.
Go to the top of the page
 
+Quote Post
MacBoy
post Feb 19 2006, 10:22 AM
Post #8



Newbie
*

Group: Members
Posts: 1
Joined: 18-February 06
Member No.: 3,345


Is there a way to make a redirect that doesn't have the .php extention?

I.e. make "http://www.site.com/forums" go to their invisionfree forums instead of using "http://www.site.com/forums.php"

Thanks.
Go to the top of the page
 
+Quote Post
Infected_enigma
post Feb 20 2006, 06:01 PM
Post #9



Leftist pinko-commie
***

Group: Members
Posts: 517
Joined: 26-December 05
From: Moab, Utah
Member No.: 2,790


QUOTE(MacBoy @ Feb 18 2006, 04:22 PM) [snapback]79446[/snapback]

Is there a way to make a redirect that doesn't have the .php extention?

I.e. make "http://www.site.com/forums" go to their invisionfree forums instead of using "http://www.site.com/forums.php"

Thanks.


Just put index.php in your forum directory and it will be used as the default.


--------------------
Go to the top of the page
 
+Quote Post
Ghost
post Feb 20 2006, 06:04 PM
Post #10



Administrator
*****

Group: Admin
Posts: 5,720
Joined: 12-February 05
From: Australia
Member No.: 1


Yep. When you goto a directory, you'll see either the directory itself (showing all files), or if there is an index file, you'll see that.

So put index.php into the /forums directory and it will take the person who visits www.site.com/forums to the link in the index.php file wink.gif


--------------------

Adobe Photoshop Tutorials - IPBForumSkins
#InternetExplorer { display: properly_please; }
Go to the top of the page
 
+Quote Post
Boog
post Feb 25 2006, 05:31 AM
Post #11



Advanced Member
****

Group: Members
Posts: 701
Joined: 26-February 05
From: Michigan
Member No.: 115


finaly ive looked for this a long time ago on google forgot about checking our coding tuts

the code is so simple and effective ty


--------------------


Click the Name to View My Gfx-Profile
Gifts
[X] [X]


Go to the top of the page
 
+Quote Post
eNVeR.SaLiH
post Aug 9 2007, 05:51 AM
Post #12



Newbie
*

Group: Members
Posts: 1
Joined: 9-August 07
Member No.: 7,523