View Single Post
Old 02-23-2008, 07:34 PM  
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
Industry Role:
Join Date: Apr 2006
Posts: 12,085
Quote:
Originally Posted by crockett View Post
I'm trying to set my network up so it's easier to later edit links. I'm not a server guru so I'm wondering if there is anything wrong with this method.

<?php
ob_start();
echo "Test";
header("Location: http://www.paysiteurl.com");
ob_flush();
?>

I'm wondering if this would cause any problems? or if it could possiable get me banned in the SE's for redirects.
You don't want to do it that way. Nothing can be done before the header; the ob_start() only makes it put things in proper order. It's a 301 redirect, though, so it's safe.

You should do mod_rewrite, instead. Less server tax and more configurable; anything after .php ?code=foo will be passed to the paysite as so:

RewriteRule ^paysite1\.php(.*)$ http://www.paysite.com/$1 [R=301,L]
__________________
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote