404 on Prestashop 1.5 under nginx

I have a problem with nginx giving a 404 error on a Prestashop 1.5.4.1
site.

This is the URL returning the 404:
www.domain.com/es/index.php?controller=order-confirmation

The prestashop is under multilanguage enviroment. Then I have:

www.domain.com/es/
www.domain.com/fr/
www.domain.com/de/
The URL rewriting runs fine, except when the url have the “index.php”.
Then
nginx returns de 404.

I think the problem is on nginx virtualhost configuration, but I don’t
know
what it’s failing.

My nginx configuration: server { listen 80; server_name www.domain.com domain.com; - Pastebin.com

That nginx configuration runs perfect on a Prestashop with only 1 domain
(without the /lang/ on the url).

Nginx version: 1.4.0

Posted at Nginx Forum:

The problem is solved.

The issue was on Prestashop.

Posted at Nginx Forum:

Hello! I have the same problem with prestashop 1.5.4.1, please tell how
did
you resolve it.
Waiting for reply. Thanks!

Posted at Nginx Forum:

What was the solution to this problem? I am also searching for the
answer to
this.

Thanks in advance.

Posted at Nginx Forum:

The problem is on prestashop configuration. Not nginx.

You must define (add if not exists) the custom name of the url on the
“SEO &
URL” tab.

Posted at Nginx Forum:

Hi tonimarmol, can you elaborate. I’m having this issue on fresh install
of
1.6. Under SEO & URL the Order Confirmation is going to a default
Prestashop
page, order-confirmation. Apparently there is already a default page
where
customers should be redirected after purchase. Where would I change?
Thanks much
Daniel

Posted at Nginx Forum:

The problem is on prestashop configuration. Not nginx.

You must define (add if not exists) the custom name of the url on the
“SEO &
URL” tab.

Posted at Nginx Forum:

You must go to “SEO & URLS” under “Preferences” tab, and add all
pages/sections/modules that don’t have a friendly url. (Press the add
button, and it will show you the pages without a friendly url)

Maybe you need to add the SEO URL of a payment module.

Posted at Nginx Forum:

Thanks. Yes, under SEO & URLS, the Order Confirmation has a friendly
URL,
and PayPal module does not have any page for Order confirmation without
a
friendly URL. Under SEO & URL, Order Confirmation is going to a default
Prestashop page, order-confirmation.

After payment is completed in PayPal, when clicking the link to return
to
the site, I get to the site, but a 404 page not available for the order
confirmation. Here is what the link shows:
[mysite]/order-confirmation.php?id_cart=20&id_module=73&key=[key]

Shopping cart ID is correct for the purchase. Under SEO & URL, Order
Confirmation is going to a default Prestashop page, order-confirmation.

Posted at Nginx Forum:

That paypal module I think it not compatible with Prestashop 1.6 because
it’s using order-confirmation.php file and this file is deleted on PS
1.6.

I think the module will be updated soon…

Anyways, have a look on Prestashop 1.5 and create the same file:
order-confirmation.php

<?php require(dirname(__FILE__).'/config/config.inc.php'); Tools::redirect('index.php?controller=order-confirmation'.((count($_GET) || count($_POST)) ? '&'.http_build_query(array_merge($_GET, $_POST), '', '&') : ''), __PS_BASE_URI__, null, 'HTTP/1.1 301 Moved Permanently'); Good luck Posted at Nginx Forum: http://forum.nginx.org/read.php?2,239630,248768#msg-248768

Hi,

Here is the right solution. you should not set all redirection in nginx
configuration server section as some proposed. you’ll have to modify the
file each time you want to add a url redirection.

To make it nice :

You shoud 1st modify the pool of php-fpm,

env[HTTP_MOD_REWRITE] = “on”

This is the variable expected by Prestashop to test if rewrite is
enabled

Next in nginx server section add :

location / {
try_files $uri $uri/ /index.php?q=$request_uri;
}

Now when an url is passing, it will try 1st to resolv, if not exist,
then will try as forder, if not it will pass it to the main controler,
if an url rewrited exist it will call the right controller.

Regards

David

Thanks very much. I have been working on this all morning. After your
message, there was a load of updates in 1.6, more than 65 modules,
including
PayPal. I was hoping, but it didn’t fix the error.

You were directly on target, becuase it called up the
order-confirmation.php. So I uploaded these from my PS 1.5, all the
order…
php files in the root. Now, when returning to my site via the link in
PayPal
site, it now goes to my site with a list of the customer’s orders.

It’s a work around, but done for now. Thanks

Posted at Nginx Forum: