Is there a way to change the routing error page - ruby

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.

Related

Shipping methods are not showing at checkout. estimate shipping methods giving 404

Whenever we go the checkout page on step 1 it shows no shipping methond
On debug found taht https://base-url/rest/V1/carts/mine/estimate-shipping-methods is giving 404.
As you can see in this screenshot
Tried ways
Enabled the swagger and check whether this end point available or not. It was avaialbe.
Create one other custom api to check whether it is calling or not. Our custom api was also giving 404. As you can see in this screenshot
After tried many different ways we found this one was the issue of the varnish cache. So if you are also facing this issue then please confirm whether cart pages are cached or not. The cart pages are never supposed to be cached.
So add a rule in default Varnish configuration where some of the routes concerning checkout by default are bypassed from being cached.
Hopefully bypassing the path "carts" and "rest" to make it work fine for your store.
Thank You!
Abbas

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

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.

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.

Magento Backend Catalog page keeps refreshing

I have a magento install on a staging environment, everything is working except the catalog backend page and the frontend layered navigation. Look at the image below. There is a backend within the backend. When visiting the page it refreshes to infinity. See this identical problem
My first guess is there is a bug in the template file but an identical template file on my local machine does not cause any issues. Additionally the database between my local and staging site are identical minus the core_config_url. The only difference is local I am running Apache and on staging I am running nginx.
The second issue which I imagine is related is that the filters on the frontend catalog page dont work. They are visible but clicking on them reloads the page without changing the products.
Any help would be appreciated. Thanks
UPDATE: After switching from NGINX to Apache the issue disappeared. I still would like to figure out what is causing the problem
I take for granted that you had already tried different browsers/clearing your browser cache and Magento cache (empty the cache directory), etc.
Are you sure you put the correct value in the cookie_domain setting? Many users that had your same problem seem to have setted up an incorrect value in that setting.
Take a look here and let me know.
I have found that usually this is caused by a server-side error on the ajax request. If there is any kind of error response returned, it will just continue to spin. Either check your Chrome console for a 500 response, or look in your server's error logs.

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

Resources