skip to Main Content

After a migration to a new server with Centos some behaviour changed.

The environment-variable REQUEST_URI contains ‘/index.html’ when http://example.com is fetched (without the index.html).

I would expect:

REQUEST_URI is ‘/’ when http://example.com is fetched.

REQUEST_URI is ‘/index.html’ when http://example.com/index.html is fetched.

This has consequences in my .htaccess (rewriterules react on ‘index.html’ instead of ’empty string’), as well as in my scripts (Perl $ENV{‘REQUEST_URI’})

How to provoke REQUEST_URI being populated with ‘/’ when only http://example.com is fetched?

2

Answers


  1. Chosen as BEST ANSWER

    Seems the problem only occurs when in Plesk 'Hosting settings' PHP Support is set to

    'Run PHP as FPM application served by nginx'

    when i change it to

    'Run PHP as FPM application served by Apache' or 'Run PHP as FastCGI application served by Apache'

    there's no problem.


  2. Try disabling DirectoryIndex and MultiViews, place this at the top of your .htaccess:

    DirectoryIndex disabled
    Options -MultiViews
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search