Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 11-18-2008, 06:38 PM Help The N00b :-)
Junior Talker

Posts: 2
Trades: 0
Ok. I'll be the first to admit that I'm a complete idiot when it comes to PHP and uploading files to the server. So if anyone can help me with the following question I'd greatly appreciate it.

Let's say I have a php redirect script. I want to redirect traffic from mysite1.c0m ====> mysite2.c0m

I create a file on my server called redirect.php within the public_html folder of the domain i want to use.

Is this right? I am completely confused. My apologies in advance for a retarded question
phpn00b is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-18-2008, 08:35 PM Re: Help The N00b :-)
Extreme Talker

Posts: 246
Trades: 3
Your question isn't "retarded". Glad to hear you're diving in with both feet. There are multiple ways to do what you want to do. If you want to redirect all traffic from mysite1.c0m to mysite2.c0m, then one way to do this with PHP is to put a file called index.php in the public_html directory of mysite1.c0m that contains the following:
Code:
<?php
header("Location: http://www.mysite2.c0m");
?>
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
CouponGuy is offline
Reply With Quote
View Public Profile
 
Old 11-18-2008, 10:40 PM Re: Help The N00b :-)
Junior Talker

Posts: 2
Trades: 0
-CouponGuy

Thanks for the reply and the support! I really appreciate it
phpn00b is offline
Reply With Quote
View Public Profile
 
Old 11-18-2008, 11:23 PM Re: Help The N00b :-)
Extreme Talker

Posts: 246
Trades: 3
Glad to help. Good luck!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
CouponGuy is offline
Reply With Quote
View Public Profile
 
Old 11-19-2008, 04:10 AM Re: Help The N00b :-)
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Note that using header(newuri) would send a 302 response to the useragent

you should be sending a 301 Permanent Redirect
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Help The N00b :-)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.80440 seconds with 12 queries