0
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?

Walf
  • 8,535
  • 2
  • 44
  • 59
  • All these links are not real static files, all of them are served by PHP. So the only thing you can do in nginx is redirecting. – Hardy Rust Oct 21 '16 at 17:22

1 Answers1

0

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.

itoctopus
  • 4,133
  • 4
  • 32
  • 44
  • 1
    I've just tried your solution, it didn't work out. Your problem was with all pages directing to home page, my problem is that when you access pages with `/` or `.html` it shows the same page, causing doubles, which are very very bad for SEO – Stanislav Kaliev Jul 23 '18 at 07:41