Google friendly "redirect" from Home [Update]

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Google friendly "redirect" from Home [Update]

Post by flip-flop »

redirect to: 301 Moved Permanently / 302 Moved Temporarily

Hi at all,

at site structure the first entry home don´t allow a "redirect to".
If you need a redirection at this point you do it at the article structure like "index.php?my_new_home".
The consequence are an Header request by the webserver like "302 Move Temporarily".
Google don´t like this. Your site would not become a good rank.
------------------------
A short and quick Workaround:
1. Create a new template named Redirect_Home.
2. At the section html head please insert:

Code: Select all

[PHP]
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: index.php?my_new_home" );
exit;
[/PHP]
3. At the site structure Home switch the template to Redirect_Home.
4. At article structure in Home-Article delete the redirect to: entry.
------------------------
That´s all.
A Google-friendly Header request "301 Moved Permanently" is provided.

If you have activated mod_rewrite: Header( "Location: my_new_home.phtml" );

Everyone an other idea? :idea:

You can test your site at http://web-sniffer.net

------------------------------------------------------------------
[Solved] since the "revised release of phpwcms" V1.2.6 date 27.04.2006.
It is implemented.

http://www.phpwcms.de/forum/viewtopic.php?p=64129#64129
------------------------------------------------------------------

Gruß Knut
Last edited by flip-flop on Fri 28. Apr 2006, 10:21, edited 4 times in total.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
rushclub
Posts: 915
Joined: Tue 17. Feb 2004, 18:52

Re: Google friendly "redirect" from Home

Post by rushclub »

flip-flop wrote:You can test your site at http://web-sniffer.net
i get this code from web-sniffer:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.licht-harmonie.de/cms/">here</a>.</p>
</body></html>
so everything seems to be fine. or am i missing something. i havent change anything. used forwarding via phpwcms.

rush
3 (!) Jahre warten reichen mir. Ich bin erst mal weg.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Yes, a very good result.
used forwarding via phpwcms
In what way you have do it via phpWCMS????

Code: Select all

root     (licht-harmonie.de)
-- CMS  (licht-harmonie.de/CMS/)
-- phpWCMS-root  (licht-harmonie.de/CMS/)
I don´t understand. A permanently redirect at your hosters config menue?

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
rushclub
Posts: 915
Joined: Tue 17. Feb 2004, 18:52

Post by rushclub »

flip-flop wrote:Yes, a very good result.
used forwarding via phpwcms
In what way you have do it via phpWCMS????

Code: Select all

root     (licht-harmonie.de)
-- CMS  (licht-harmonie.de/CMS/)
-- phpWCMS-root  (licht-harmonie.de/CMS/)
I don´t understand. A permanently redirect at your hosters config menue?

Gruß Knut
i have a forwarding in the homedirectory to the folder "de". there is also an folder "en" so the homefolder has no content but a forwarding. a solution where i can set the forwarding sidewide to the reight setting - thats what i realy need. is there a solution?

rush
3 (!) Jahre warten reichen mir. Ich bin erst mal weg.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

How did you forward from "/" to "/CMS/"?

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
rushclub
Posts: 915
Joined: Tue 17. Feb 2004, 18:52

Post by rushclub »

with

Code: Select all

<meta http-equiv="refresh" content="0;URL=cms/index.php">
is that the wrong solution?

cheers
rush
3 (!) Jahre warten reichen mir. Ich bin erst mal weg.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

rushclub wrote:with

Code: Select all

<meta http-equiv="refresh" content="0;URL=cms/index.php">
is that the wrong solution?

cheers
rush
What most people seem to not realize, is that the http-equiv attribute is just a way to specify HTTP headers in a meta tag. This is handy when you want to do so in static pages, but PHP has the more "proper" way to specify headers: http://www.php.net/header. This creates a real HTTP header.

Redirection (whether at Server-level or with PHP header) is recommended, more often, as "best" method:
http://www.w3.org/QA/Tips/reback

BTW, I've always ~assumed~ this format to be more correct than yours:
<meta http-equiv="refresh" content="0;URL=/cms/index.php">
anyone know if it makes a difference?
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi folks!

[SOLVED]

we don´t use this any more since the "revised release of phpwcms" V1.26 date 27.04.2006.
It is implemented.

http://www.phpwcms.de/forum/viewtopic.php?p=64129#64129

Thanks Knut :D
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Post Reply