NAVIGATION
This shows you the differences between two versions of the page.
|
english:technics:tips:page-forwarding [2010/10/31 20:08] Claus |
english:technics:tips:page-forwarding [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 90: | Line 90: | ||
| ===== Forwarding with error 404 (second try): ===== | ===== Forwarding with error 404 (second try): ===== | ||
| Another attempt for dealing with "not found" or "moved elswhere". | Another attempt for dealing with "not found" or "moved elswhere". | ||
| + | See forum: http://forum.phpwcms.org/viewtopic.php?p=127140#p127140 | ||
| ==== Set up a (potentially global) 404 file ==== | ==== Set up a (potentially global) 404 file ==== | ||
| Line 201: | Line 202: | ||
| headerRedirect('http://mysupidupidomain.tld/index.php'.returnGlobalGET_QueryString()); | headerRedirect('http://mysupidupidomain.tld/index.php'.returnGlobalGET_QueryString()); | ||
| } | } | ||
| + | } | ||
| if($aktion[0] == 0 && !isset($_GET['adclickval'])) { | if($aktion[0] == 0 && !isset($_GET['adclickval'])) { | ||
| Line 221: | Line 223: | ||
| ==== What does this script do? ==== | ==== What does this script do? ==== | ||
| + | It will check if a queried page is existing within your system. Perhaps you did change an alias some while ago and now the bookmarks of your friends are going wonk. phpwcms' frontent_init-script will now take over and call a little page you've set up already, I bet. No? | ||
| + | |||
| + | ==== Create your error article ==== | ||
| + | So go ahead and create a new page (article) with an excusion for the worries, a search mask and whatever you like - it's your own phpwcms 404 error page ;) . Don't forget to save it into a hidden category (frontend menu status checked to [x]hide). This way the error page doesn't belong anywhere and can't mislead anybody. | ||
| + | |||
| + | ==== Edit your 404_forwarding.php ==== | ||
| + | Check the article id of your newly created article (you know how to do that), edit 404_forwarding.php and enter it instead of that 1255 (because this ArticleID from further above is just an example, not more) to reflect your special article ID. | ||
| + | If somebody tries to search your phpwcms installation by using directory structures like domain.tld/heavy/ the script is passing the force over to moved.php. | ||
| + | ==== It's for a multidomain setup too ==== | ||
| + | But this is another story. | ||