Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

fab5freddy

macrumors 65816
Original poster
Jan 21, 2007
1,206
7
Heaven or Hell
I would like to make a Redirect Page with some Google Analytics on the Page
too, before i send the redirect page to an affiliate offer.

What is the best way to do this ?

ps. What's better a PHP Redirect or an.htaccess Redirect ?

Thanks for any suggestions!
 
Angelwatt. You're right. I've only used with an if...then, ie. Are you logged in? Then carry on, else go to the log in page.

I'll have a look tomorrow and see if I can come up with anything for you.
 
I knew you could do it somehow....

Try 'output buffering' and see if that works for you. I'd imagine it's resource hungry, and is a bit of a clunky workaround, but works at least..

PHP:
ob_start();
echo "Anything you like";
header("Location: http://www.foo.com/bar.php");        
ob_flush();
 
I've tried it, yes, and it seems to do the job - the trouble is, it happens so quickly I can't tell if the echo is occuring.

I'll guess yes, but once you put your analytics stuff in, you should be able to look at the Google logs to see?

(Google analytics - not my bag really, I have someone else do that for me)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.