headerRedirect or header('Location

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

headerRedirect or header('Location

Post by update »

What's better of these two / where is the real difference (for search engines et al) between

header( "HTTP/1.1 301 Moved Permanently" );
header('Location: http://....

and

header( "HTTP/1.1 301 Moved Permanently" );
headerRedirect('index.php?.....

Anybody?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: headerRedirect or header('Location

Post by flip-flop »

Code: Select all

headerRedirect('index.php?whow', 301);
is the same like:

Code: Select all

header( "HTTP/1.1 301 Moved Permanently" );
header('Location: http://....
Have a look into the file include/inc_lib/default.inc.php
function headerRedirect

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: headerRedirect or header('Location

Post by update »

I had a look and it seems to be this way:
headerRedirect is used within a domain and header('Loc... is switching between domains
Somewhat like this?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: headerRedirect or header('Location

Post by Oliver Georgi »

There is no difference.

But headerRedirect() can be used also without a new location. It is just a simple wrapper function.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply