How to route 404s to a specific page in Ghost(Pro)? - yaml

I'm interested in routing all 404 redirects to a specific page in my Ghost(Pro) blog. How do I do this? If it's with YAML, what do I put in the routes.yaml to achieve it?

It seems I didn't do enough of a deep dive for the info. Ghost has automatic routing of error pages via the error.hbs, error-404.hbs, and error-500.hbs template files.

Related

Is there a way to change the routing error page

Simple Question: I want to redirect or change the "Routing Error" page so the user cannot see all the routes. (*Not 404, etc)
I'm not sure if this will go away once it is in production, but I didn't see anyone talking about this page specifically.. Nothing is broken, I just don't want to show the Routes page incase a user session ends.
Thanks SO
What I have done:
Stackoverflow has question/answer for changing a 404 page etc which I have done.
It also has posts about routes that don't work which isn't my problem. All routes work.
I have tried to research modifying the ActionController::RoutingError and that is why I came here
The routing error page you see by default during development will include much more information than you would see in production. There, you usually only see a generic 404 error page. You can check this yourself by starting your app with
RAILS_ENV=production rails server
Make sure to configure your database appropriately for production too. If you want to setup custom handling for routing errors in production, e.g. to render a specific page), please refer to the answer on rescue_from ActionController::RoutingError in Rails 4.

What's the best approach to have a custom 404 page with October CMS with Laravel 5

I'm working on a project based on the October CMS, with Laravel 5.0.35.
I'm trying to override the 404 page.
The current 404 page is located here:
modules\cms\views\404.php
... and is served by:
modules\cms\classes\Controller.php
As you can see, both the controller and the view are inside modules. This folder is a dependency folder and its content should not be altered. The best approach I see here is to use an override.
You can see the October CMS structure here:
https://github.com/octobercms/october
Do you have any ideas or suggestions on how to achieve this?
Thanks.
'If the theme contains a page with the URL /404 it is displayed when the system can't find a requested page.'
http://octobercms.com/docs/cms/pages#404-page
Essentially just create a page withe the URL /404 and it will use this by default. The same can be done for an error (500) page, just use /error.

codeigniter custom 500 error

At this very moment I do not have any 500 error being thrown, but in case I ever do in the future I'm trying to customize a page so users never see that awful white screen.
I am having trouble adding said page. I have the page made and a controller that loads the page, but when I try and route the page in the route file or route it using .htaccess I'm still getting that white screen.
This is what I have tried in my route file
$route['500_override'] = 'notFoundErrorPage/serverError';
and then this is what I have tried in my .htaccess
ErrorDocument 500 http://writeyourfiction.com/NotFoundErrorPage/serverError
any help would be wonderful!
CodeIgniter does not have any custom error handlers aside from 404_override, so using one for any other HTTP code will be fruitless.
Apache has custom error pages as you've already attempted, but there are a couple of things to note that may be affecting your results:
1: A local URL begins with a /
A local URL to redirect to (if the action begins with a "/").
2: Specifying in an .htaccess may require additional configuration:
It may be used in .htaccess files if AllowOverride is set to FileInfo.
If you seek additional help, either here or elsewhere, please provide more information about your server environment: operating system, web server (e.g. Apache) and version, any relevant add-ons or modifications you may have made, etc.
It depends on the server software you are using. If you are using Apache, see here: http://httpd.apache.org/docs/2.2/custom-error.html
If you aren't using apache, google "[webserver software] custom 500 page".
If you're still having trouble, try asking on serverfault.com.

CodeIgniter: 404 Page not found on first launch

Good Day, I have used codeIgniter a little but whenever we download codeIgniter framework from their website and after extraction to the server root folder. If we access the framework we usually se a Welcome page. But here is a different situation that I'm seeing a 404 page not found error page. I have tried a lot but unable to identify what the hack is behind showing a 404 Page instead of the beautiful Welcome Page.
Not sure if it helps, but check the .htaccess and routes. I just answered a similar question here passing variable to default controller in codeigniter

Magento mini search form from secure pages

I've run into a catch-22 with the search form that hopefully someone can help me with. From any of the secure pages in our Magento store (My Account, Checkout, etc) if you use the mini search form in the header, it takes you to a secure search results page https://oursite.com/catalogsearch/result. This results in a browser warning because there is unsecure content on that page. I thought I could fix this by modifying the CatalogSearch Helper class so that the getResultUrl functions always returns an http: link. However, this results in the browser warning you that you are about to send form data over a non-secure connection. So I can't seem to find a solution that doesn't look dangerous to the user.
Any ideas?
I know this is not the proper EAV/MVC/1000 lines of XML Magento module way of doing it, however, since this is a straightforward http/https problem you can put a couple of lines in .htaccess to get your search box behaving correctly:
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^catalogsearch http://www.example.com/catalogsearch/ [R=301,L]
The right way to fix this is not to use mixed content on that page. Magento can usually handle any page over HTTPS if it is requested to do so, so find the assets that are hardcoded over http:// and fix them to respect the current protocol properly.
For me the incorrect url got stuck in cache (we had heavy cache on the live server) and that caused the security warning for me. Hope this helps someone.
The question should be - why is this happening?
Doing a search on a non-secure page will yield results on a non-secure page.
After having visted a secure page, searching on a non-secure page will yield results on a secure page - how does this make any sense? What is the purpose of this?

Resources