URL to Custom 404 message
-
badhoy
URL to Custom 404 message
I need to include a link to my custom 404 message in my .htaccess file. What would this url look like to get to the CMSMS custom 400 error message?
-
Sonya
Re: URL to Custom 404 message
Hello,
if you require this in your action script, you can just use
Assumed you have no page with alias 'notfound' you will be redirected to the CMSMS Custom 404 Error page.
Sonya
if you require this in your action script, you can just use
Code: Select all
header('Location:/index.php?page=notfound');Sonya
-
Pierre M.
Re: URL to Custom 404 message
Hello,
or rather than finding a non existing URL to redirect to to be redirected to an error page (not enough KISS to my feeling), you could adjust the scope of your existing err404 settings. I mean something like this in httpd.conf or .htaccess :
Sample httpd.confS tend to have a global scope (/) 404 setting and you (and others) want :
-no setting for /cmsms...
-in webserver setting for /else...
Hope this helps, I think I'm not easy to read tonight
Pierre M.
or rather than finding a non existing URL to redirect to to be redirected to an error page (not enough KISS to my feeling), you could adjust the scope of your existing err404 settings. I mean something like this in httpd.conf or .htaccess :
Code: Select all
#the rewrite conds and rules about the /cmsms/ installation
#same as sample .htaccess
#that way, CMSms should catch 404 within its rewritten URL scope
#then only, the non CMSms scoped err 404 statement
<Directory> or <DirectoryMatch> or <Location> or <LocationMatch> /only/outside/of/cmsms*
ErrorDocument 404 /some/path/to/404.html
</Directory> or </DirectoryMatch> or </Location> or </LocationMatch>
-no setting for /cmsms...
-in webserver setting for /else...
Hope this helps, I think I'm not easy to read tonight
Pierre M.
-
cyberman
Re: URL to Custom 404 message
Not sure if you know it - CMSms has a built in possibility to set your own 404 message (admin panel, site admin > global settings) so you dont need htaccess for that.badhoy wrote: I need to include a link to my custom 404 message in my .htaccess file.
-
Sonya
Re: URL to Custom 404 message
Hello Pierre,
the question was how to redirect to CMSMS 404 custom error page. For your solution I need to know the URL of this page that I can place in .htaccess or httpd.conf. I was not able to figure out the URL and therefore I use the trick with non-existing alias.
Sonya
the question was how to redirect to CMSMS 404 custom error page. For your solution I need to know the URL of this page that I can place in .htaccess or httpd.conf. I was not able to figure out the URL and therefore I use the trick with non-existing alias.
Sonya
-
Sonya
Re: URL to Custom 404 message
It will not catch the requests which do not include index.php in it. If you try to call something like http://yourcmssite/badurl.php you will not get the custom 404 error of CMS Made Simple but the error site of your server.cyberman wrote: Not sure if you know it - CMSms has a built in possibility to set your own 404 message (admin panel, site admin > global settings) so you dont need htaccess for that.
-
cyberman
Re: URL to Custom 404 message
Upps, my support brain (and fingers) were faster than my eyes
...
