![]() |
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. |
No.
PHP headers only work if nothing has been put out before hand. |
Just curious why would you want to put it in the body anyway?
My 2cents is to use .htaccess instead. |
You may not utilize header features within the body. Impossible. You must use HTML. I recommend researching a bit: PHP: header - Manual
|
If you REALLY want to do it, you could probably pull it off by playing with output buffering functions/settings...
|
Quote:
|
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