misu3108 Posted January 27, 2015 Share Posted January 27, 2015 Hi, I noticed I have some pages in bing.com (or google.com) that don't exit on my site anymore and when I click on the link to see them I get to my site with and 404 error. I think I supposed to have my site with a template 404 error showing not a nginx redirect page. here's a screeshot: nginx config file: ............. ### Converted rules #### rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last; rewrite ^/([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$1$2$3.jpg last; rewrite ^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last; rewrite ^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last; rewrite ^/c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2$3.jpg last; rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last; rewrite ^/images_ie/?([^/]+)\.(jpe?g|png|gif)$ /js/jquery/plugins/fancybox/images/$1.$2 last; rewrite ^/page-not-found$ /index.php?controller=404 last; try_files $uri $uri/ /index.php$is_args$args; error_page 404 /index.php?controller=404; ........... Thanks. Link to comment Share on other sites More sharing options...
misu3108 Posted January 28, 2015 Author Share Posted January 28, 2015 Anyone? Link to comment Share on other sites More sharing options...
tomerg3 Posted January 28, 2015 Share Posted January 28, 2015 This is more of a server nginx issue, rather than a PrestaShop issue, you may want to check this with your hosting company Link to comment Share on other sites More sharing options...
misu3108 Posted October 27, 2015 Author Share Posted October 27, 2015 OK SO I FIGURE IT OUT! TO GET THE PRESTASHOP'S 404 TEMPLATE instead of an empty page from nginx remove line or comment out from your host config file (/etc/nginx/sites-available/your-config-file) : #error_page 404 /index.php?controller=404; And it WILL WORK! 1 Link to comment Share on other sites More sharing options...
Recommended Posts