Page 1 of 1

[solved]Custum Error Page... how does it work?

Posted: Tue May 31, 2011 5:45 pm
by Mieszko
Hello everybody,

I have turned an old website of mine into a cmsms driven site.
Went fine so far.
I would like the old ( no longer existing links) to be handled by an error page.

My old links looked like this:
http://mysite.de/index.php?show=termine.

The new ones look like:
http://mysite.de/index.php?seite=termine.

After setting up the error page I would now expect that calls to the old sites would end at my error page. But they don't. Instead the default homepage is shown.

What am I doing wrong?
PS.: I don't/can't use pretty URLs. I use the latest version of cmsms ( 1.9.4.2).

Thanks for answers.

Re: Custum Error Page... how does it work?

Posted: Tue May 31, 2011 11:08 pm
by Jos
You can add a new page and set the Content Type from "Content" to "Error Page"

http://forum.cmsmadesimple.org/viewtopi ... =8&t=54488

Re: Custum Error Page... how does it work?

Posted: Tue May 31, 2011 11:22 pm
by calguy1000
Keep in mind... there is a special configuration variable that CMSMS looks at: query_var that indicates what 'page' within CMSMS should be displayed. That variable is 'query_var' and by default the value is 'page'.

That means that you can access:

http://mysite.com/ or http://mysite.com/index.php <-- CMSMS will lookup and display the page that is marked as 'default'.
http://mysite.com/index.php?page=somepage <-- CMSMS will look for a page with alias 'somepage' and if it exists, display it. If it does not, it will generate a 404 error.
http://mysite.com/index.php?foo=bar <-- CMSMS will lookup and display the page that is marked as 'default', the foo=bar argument will be ignored by CMSMS, but maybe your content traps it.
http://mysite.com/index.php?page=somepage&foo=bar <--- <-- CMSMS will look for a page with alias 'somepage' and if it exists, display it. If it does not, it will generate a 404 error. CMSMS will ignore the foo=bar argument, but maybe your content, templates or page logic do something special with the foo argument.

Re: Custum Error Page... how does it work?

Posted: Wed Jun 01, 2011 6:15 am
by Mieszko
Thanks for clarifying. So what I observe is the expected behaviour.
Additionally I won't be able to use the MovedPages module then.

Thanks again