Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
February 13, 2012, 02:29:25 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
149700
Posts in
21103
Topics by
7538
Members
Latest Member:
ionline
WebsiteBaker Community Forum
English
Modules
(Moderator:
Argos
)
New module: 404 redirect
Pages: [
1
]
Go Down
Author
Topic: New module: 404 redirect (Read 1362 times)
Ruud
Board member
WebsiteBaker Org e.V.
Offline
Posts: 2094
New module: 404 redirect
«
on:
March 23, 2011, 02:51:11 PM »
If you are using the method of redirecting 404 errors to a defined error-page, this module can help you to forward the visitor to the correct page.
It will allow you to create a list with url's (or a part of a url) where you expect wrong requests (ie. old google listings or removed pages) linked to a dropdown list where you can select the WB page is should redirect to.
Redirection is done with a 301 redirect ("Permanently moved"), so it will tell the search engine crawlers the correct url too.
Example link:
http://www.allwww.nl/pages/websitebaker.php
Ruud
[edit]
31-08-2011 - Version 0.2
Now the redirect page selector shows pages in the same order as the normal pagetree
07-09-2011 - Version 0.3
Changed the module foldername into mod404. Numeric foldername gave unexpected problems when removing a "404" section in wb2.8.2. Note: upgrading is not possible, uninstall older versions first!
07-09-2011 - Version 0.4
Bugfix. the 404 folder was used in saving the settings.
«
Last Edit: September 07, 2011, 04:42:21 PM by Ruud
»
Logged
Professional WebsiteBaker Developer
BlackBird
Offline
Posts: 1937
Re: New module: 404 redirect
«
Reply #1 on:
March 23, 2011, 05:05:59 PM »
Looks good and sound very helpful.
Logged
Alle großen Veränderungen beginnen im Kleinen
mr-fan
Offline
Posts: 1538
Re: New module: 404 redirect
«
Reply #2 on:
March 24, 2011, 04:14:40 PM »
Great Mod Ruud,
so far that im not able to create a whole module i used a Code Page for mapping pages.
Blackbird helped me a few weeks ago with the same thing that your module fits!
i used a simple PHP snippet:
Code:
<?php
//ignore
$map
= array(
'/pages/old-page.php'
=>
'http://www.url.com/newfolder/or-new-name.php'
,
'/pages/older-page.php'
=>
'http://www.url.com/newfolder/or-newer-name.php'
,
''
=>
''
,
''
=>
''
,
);
//echo $map[$_SERVER['REQUEST_URI']];
if ( isset(
$map
[
$_SERVER
[
'REQUEST_URI'
]] ) ) {
$new_loc
=
$map
[
$_SERVER
[
'REQUEST_URI'
]];
header
(
"HTTP/1.1 301 Moved Permanently"
);
header
(
"Location:
$new_loc
"
);
exit();
} else {
echo
$map
[
$_SERVER
[
'REQUEST_URI'
]];
}
best regards martin
Logged
dbs
WebsiteBaker Org e.V.
Offline
Posts: 3275
Re: New module: 404 redirect
«
Reply #3 on:
March 25, 2011, 07:56:04 AM »
thx ruud, great modul and works well.
Logged
Argos
Moderator
Offline
Posts: 2084
Re: New module: 404 redirect
«
Reply #4 on:
August 27, 2011, 10:21:01 AM »
Very handy module. Thanks Ruud!
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
crnogorac081
AddOn Development
Offline
Posts: 1680
Re: New module: 404 redirect
«
Reply #5 on:
August 28, 2011, 08:27:56 PM »
Hi,
I also did something similar , but mostly for news..
You can take a look here:
http://www.websitebaker2.org/forum/index.php/topic,22168.0.html
all best,
Ivan
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Argos
Moderator
Offline
Posts: 2084
Re: New module: 404 redirect
«
Reply #6 on:
August 30, 2011, 11:01:32 PM »
Hm... the page selection menu doesn't respect the hierarchy of the pages. It first shows the 0-level pages, then the 1-level pages, then the 2-level pages, etc. Makes it almost unusable in big, complex sites.
It also shows pages titles, instead of menu titles or (preferably) urls
Can this be fixed?
«
Last Edit: August 30, 2011, 11:05:35 PM by Argos
»
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Ruud
Board member
WebsiteBaker Org e.V.
Offline
Posts: 2094
Re: New module: 404 redirect
«
Reply #7 on:
August 31, 2011, 10:44:26 AM »
Quote from: Argos on August 30, 2011, 11:01:32 PM
It also shows pages titles, instead of menu titles or (preferably) urls
Can this be fixed?
Updated the module to v0.2 (see first post).
The page selector now is in the same order as the normal pagetree.
The list now shows: "Menu_title (Page_title)"
Ruud
Logged
Professional WebsiteBaker Developer
Argos
Moderator
Offline
Posts: 2084
Re: New module: 404 redirect
«
Reply #8 on:
August 31, 2011, 10:49:35 AM »
You're the man!
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
dbs
WebsiteBaker Org e.V.
Offline
Posts: 3275
Re: New module: 404 redirect
«
Reply #9 on:
September 07, 2011, 08:19:56 AM »
hi, plz check: delete the section 404 redirect.
message: 0 not found
deleting not possible.
dbs
Logged
Ruud
Board member
WebsiteBaker Org e.V.
Offline
Posts: 2094
Re: New module: 404 redirect
«
Reply #10 on:
September 07, 2011, 09:33:48 AM »
I cannot reproduce this error.
Deleting of both a section as a full page works fine for me.
There are no special deleting routines in the module.
The settings are not linked to a single page, so they are not removed.
Deleting a "404" section is just what WB does on removing any other module/section.
Logged
Professional WebsiteBaker Developer
dbs
WebsiteBaker Org e.V.
Offline
Posts: 3275
Re: New module: 404 redirect
«
Reply #11 on:
September 07, 2011, 02:28:19 PM »
hm, ok, have tested on 2 installations, with the same error.
try to delete the section = 0 not found
must delete the whole page, maybe only my problem.
Logged
Argos
Moderator
Offline
Posts: 2084
Re: New module: 404 redirect
«
Reply #12 on:
September 07, 2011, 03:41:39 PM »
I can confirm that deleting is not possible.
Version 2.8.2, revision 1506.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Ruud
Board member
WebsiteBaker Org e.V.
Offline
Posts: 2094
Re: New module: 404 redirect
«
Reply #13 on:
September 07, 2011, 04:14:07 PM »
The "delete section" routines in WB2.8.2 were changed.
A test within that functionality fails if the module foldername is numeric.
A fixed version (0.3) is in the first post of this tread.
Note: do not upgrade, uninstall the old version first.
Logged
Professional WebsiteBaker Developer
dbs
WebsiteBaker Org e.V.
Offline
Posts: 3275
Re: New module: 404 redirect
«
Reply #14 on:
September 07, 2011, 04:34:43 PM »
modify.php lines 23,24,25 contains path modules/404 instead modules/mod404
Logged
Ruud
Board member
WebsiteBaker Org e.V.
Offline
Posts: 2094
Re: New module: 404 redirect
«
Reply #15 on:
September 07, 2011, 04:43:05 PM »
Oops.. sorry
fixed in v0.4
Logged
Professional WebsiteBaker Developer
dbs
WebsiteBaker Org e.V.
Offline
Posts: 3275
Re: New module: 404 redirect
«
Reply #16 on:
September 07, 2011, 04:49:08 PM »
all is fine now and works. thx
Logged
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
-----------------------------
English
-----------------------------
=> Help & Support
-----------------------------
General
-----------------------------
=> WebsiteBaker Website Showcase
-----------------------------
English
-----------------------------
=> Modules
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
-----------------------------
General
-----------------------------
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
-----------------------------
General
-----------------------------
=> Security Announcements
-----------------------------
Deutsch (German)
-----------------------------
=> Hilfe/Support
-----------------------------
General
-----------------------------
=> Documentation
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
=> Module & Snippets
-----------------------------
English
-----------------------------
=> Archive (posts up to 2007)
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Deutsch (German)
-----------------------------
=> jQuery
=> Tutorials
=> Templates & Design
-----------------------------
English
-----------------------------
=> jQuery
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
===> Suggestions
-----------------------------
Deutsch (German)
-----------------------------
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
===> Vorschläge
-----------------------------
English
-----------------------------
===> Software bugs
-----------------------------
Deutsch (German)
-----------------------------
===> Softwarefehler
=====> Module / Extensions
-----------------------------
English
-----------------------------
=====> Modules / Extensions
-----------------------------
Deutsch (German)
-----------------------------
===> Erfahrungs und Testberichte
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...