Joomla SEF URLs with Nginx

392 Views Asked by At
Gentoo Linux 4.4.8-hardened
Nginx 1.10.1
MySQL 5.6.33
PHP 5.6.26
Joomla 1.5.26

Migration to latest Joomla is close to impossible because of the amount of custom components that have been written during 5 years.

The problem is with URLs.

Although we created menu items that link to specific pages, they still appear in index

Example:

normal link, created by menu, and this is the only link that should exist:

/delivery-install.html

but, this page is also accessible through these kinds of URLs:

/delivery-install
/delivery-install/

Right now I'm trying to avoid it with 301 redirects, but I know that it's not the right thing to do.

How to solve this problem?

1

There are 1 best solutions below

1
itoctopus On

We have finally found a solution to this problem, and we have documented the whole process here.

Essentially, you will need to enable cgi.fix_pathinfo and you will need to set the value of PATH_TRANSLATED in the fastcgi_params file.

The root cause of the problem is one of the much needed PHP $_SERVER variables is passed empty to the application by nginx.