![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Nov 2003
Location: 237 619 975
Posts: 8,944
|
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.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Guest
Posts: n/a
|
No.
PHP headers only work if nothing has been put out before hand. |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Apr 2002
Location: Los Angeles
Posts: 6,986
|
Just curious why would you want to put it in the body anyway?
My 2cents is to use .htaccess instead. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed IT Professional
Industry Role:
Join Date: Nov 2005
Location: Hollywood, CA
Posts: 3,744
|
You may not utilize header features within the body. Impossible. You must use HTML. I recommend researching a bit: PHP: header - Manual
__________________
The Best Affiliate Software, Ever. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
If you REALLY want to do it, you could probably pull it off by playing with output buffering functions/settings...
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Jul 2006
Posts: 620
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
|
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?
|
![]() |
![]() ![]() ![]() ![]() ![]() |