GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Can a 301 redirect using php be done in the body? (https://gfy.com/showthread.php?t=885146)

Kard63 02-01-2009 11:46 AM

Can a 301 redirect using php be done in the body?
 
In the <body>, not the <head> can I do a 301 redirect using php?


I can use html too, obviously lol, but I was already told "no" on that.


Thanks.

Killswitch - BANNED FOR LIFE 02-01-2009 11:50 AM

No.

PHP headers only work if nothing has been put out before hand.

tiger 02-01-2009 12:56 PM

Just curious why would you want to put it in the body anyway?

My 2cents is to use .htaccess instead.

Nookster 02-01-2009 01:00 PM

You may not utilize header features within the body. Impossible. You must use HTML. I recommend researching a bit: PHP: header - Manual

woj 02-01-2009 01:07 PM

If you REALLY want to do it, you could probably pull it off by playing with output buffering functions/settings...

devine 02-01-2009 09:39 PM

Quote:

Originally Posted by tiger (Post 15419257)
Just curious why would you want to put it in the body anyway?

My 2cents is to use .htaccess instead.

ditto and ditto :thumbsup

Jakez 02-01-2009 09:41 PM

AFAIK if you place ob_start(); (inside php tags of course) you won't have trouble with the HTML that is put out before hand. Could be pretty messy though and I think you need to close (stop) it somewhere also?


All times are GMT -7. The time now is 08:46 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123