Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 24, 2012, 11:12:40 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
155451
Posts in
21704
Topics by
7731
Members
Latest Member:
zvaigzdzius
WebsiteBaker Community Forum
English
WebsiteBaker 2.x discussion
(Moderator:
Argos
)
Optional Stub Page on Delete
Pages: [
1
]
Go Down
Author
Topic: Optional Stub Page on Delete (Read 1205 times)
bupaje
Offline
Posts: 519
Optional Stub Page on Delete
«
on:
November 06, 2008, 03:36:31 AM »
Once Google crawls your site I notice it is hard as heck to get rid of references to pages you have deleted without a 301 permanent redirect page. I don't have htaccess on my Yahoo webhosting and since I test a lot of content I have referenced to pages that are long gone generating errors of Google. I have manually created 301 redirects for some but if there are lots of pages I though of a feature idea.
What if there was an option in WB when you delete or move a page to leave a stub page - a 301 redirect with the old name- and an option to point it to a new section. This way you don't lose the page rank of this moved page and don't end up hundreds of errors listed by Google.
Logged
My Blog, My Site
thorn
Offline
Posts: 980
Re: Optional Stub Page on Delete
«
Reply #1 on:
November 06, 2008, 10:36:48 AM »
Hello,
what about setting a menulink (visibility: hidden) for this purpose?
thorn.
Logged
Projekte
bupaje
Offline
Posts: 519
Re: Optional Stub Page on Delete
«
Reply #2 on:
November 06, 2008, 03:36:27 PM »
I'm not sure how Google would view the menulink redirect.
http://sebastians-pamphlets.com/google-and-yahoo-treat-undelayed-meta-refresh-as-301-redirect/
seems to indicate that Yahoo might handle it ok with Google possible seeing it as a 302 instead. Too many spammers use redirects so 301 is probably the safest. I guess I could try to rename the menulink mod, change the redirect code to the 301 code and this might work ... hmmmm... thanks for the suggestion.
Logged
My Blog, My Site
thorn
Offline
Posts: 980
Re: Optional Stub Page on Delete
«
Reply #3 on:
November 06, 2008, 11:37:58 PM »
Hello,
if you want to force the menulink to generate a 301-redirect
you have to change wb/index.php:
from
Code:
// redirect
header('Location: '.WB_URL.PAGES_DIRECTORY.$target_page_link.PAGE_EXTENSION.($anchor?'#'.$anchor:''));
exit;
to
Code:
// redirect with 301
header("HTTP/1.1 301 Moved Permanently");
header('Location: '.WB_URL.PAGES_DIRECTORY.$target_page_link.PAGE_EXTENSION.($anchor?'#'.$anchor:''));
exit;
which will work as expected:
Code:
http://localhost/wbtest/pages/link.php
GET /wbtest/pages/link.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.3) Gecko/2008092814 Iceweasel/3.0.3 (Debian-3.0.3-3)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de-de,en-us;q=0.8,en;q=0.5,ja;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: UTF-8,*
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost/wbtest/
Cookie: ...
HTTP/1.x 301 Moved Permanently
Date: Thu, 06 Nov 2008 22:34:21 GMT
Server: Apache/2.2.9 (Debian) PHP/5.2.6-5 with Suhosin-Patch
X-Powered-By: PHP/5.2.6-5
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: http://localhost/wbtest/pages/start22.php
Content-Length: 0
Keep-Alive: timeout=15, max=98
Connection: Keep-Alive
Content-Type: text/htm
thorn.
Logged
Projekte
pcwacht
AddOn Development
Offline
Posts: 2856
Re: Optional Stub Page on Delete
«
Reply #4 on:
November 06, 2008, 11:44:48 PM »
Thorn, wouldn't the 301 come with every redirect, or every menulink? And is that wishable?
John
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
thorn
Offline
Posts: 980
Re: Optional Stub Page on Delete
«
Reply #5 on:
November 06, 2008, 11:56:58 PM »
Hello,
normally, the redirect will generate a 302:
Code:
// redirect
header('Location: '.WB_URL.PAGES_DIRECTORY.$target_page_link.PAGE_EXTENSION.($anchor?'#'.$anchor:''));
exit;
Code:
http://localhost/wbtest/pages/link.php
GET /wbtest/pages/link.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.3) Gecko/2008092814 Iceweasel/3.0.3 (Debian-3.0.3-3)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de-de,en-us;q=0.8,en;q=0.5,ja;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: UTF-8,*
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost/wbtest/
Cookie: ...
HTTP/1.x 302 Found
Date: Thu, 06 Nov 2008 22:54:33 GMT
Server: Apache/2.2.9 (Debian) PHP/5.2.6-5 with Suhosin-Patch
X-Powered-By: PHP/5.2.6-5
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: http://localhost/wbtest/pages/start22.php
Content-Length: 0
Keep-Alive: timeout=15, max=98
Connection: Keep-Alive
Content-Type: text/html
...
To make this a 301, you have to add
header("HTTP/1.1 301 Moved Permanently");
to every redirect.
thorn.
«
Last Edit: November 06, 2008, 11:59:07 PM by thorn
»
Logged
Projekte
pcwacht
AddOn Development
Offline
Posts: 2856
Re: Optional Stub Page on Delete
«
Reply #6 on:
November 07, 2008, 12:07:52 AM »
Ah, ok, thanks
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
bupaje
Offline
Posts: 519
Re: Optional Stub Page on Delete
«
Reply #7 on:
November 07, 2008, 12:14:39 AM »
Ah, thanks thorn. What might be the effect of making every menulink a 301? I just use menulink to direct to a page on my site internally or to hide a more complex url so I guess it should be no problem. Thanks a million. Going to try it right now.
[OK, works like a charm. I will monitor the Google web tools and post and post a follow up here for reference, if indeed his helps to get rid of those errors. ~thanks again]
«
Last Edit: November 07, 2008, 12:23:14 AM by bupaje
»
Logged
My Blog, My Site
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...