1

In Opencart, 404 error is shown in this url: /index.php?route=error/not_found This page has a 404 custom page with the template of all the website.

I´ve tried in Nginx with:

error_page 404 = /index.php?route=error/not_found; 

But it goes to nginx 404 error page. If I only write:

error_page 404 = /index.php; 

It goes to the index, but I don´t want to go to the index, I want to go to 404 opencart page.

I´ve also tried with a named location, and inside a rewrite, but I couldn´t get it working:

error_page 404 = @error; location @error { rewrite ^.*$ /index.php?route=error/not_found last; } 

It also doesn´t work. It goes to nginx 404 error page

2
  • Why didn't you turn on SEO URL's in OpenCart? Commented Oct 8, 2013 at 20:52
  • I´ve SEO URL activated. What has that to do with this? Opencart understand routes, not seo. In .htaccess you rewrite seo urls in routes with RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] Commented Oct 8, 2013 at 21:07

1 Answer 1

0

Ok, I found the problem. fastcgi_intercept_errors was on, and nginx was intercepting the errors... it seems obviously now. I changed to fastcgi_intercept_errors off, and now is working perfect.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.