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

Alberto
  • 111
  • 1
  • 3
  • Why didn't you turn on SEO URL's in OpenCart? – Michael Hampton Oct 08 '13 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] – Alberto Oct 08 '13 at 21:07

1 Answers1

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.

Alberto
  • 111
  • 1
  • 3