Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have working FastCGI PHP inside Apache using mod_fcgid. But I noticed that PHP scripts are executed even without .php suffix specified.

Eg: if file is mail.php then and returns same output of PHP file mail.php

Is this common behaviour? And should be this (execution without suffix) disabled?

my Apache configuration is:

AddHandler fcgid-script .php
<Directory "{WwwRoot}">
    Options -Indexes MultiViews FollowSymLinks +ExecCGI
    FCGIWrapper {ConfigsRoot}/fcgi-php5 .php
    Order allow,deny
    allow from all

with simple wrapper



share|improve this question
As @LazyOne said, this behavior is up to you, but it may behoove you to leave it, as you can use /mail/ instead of /mail.cgi to hide the fact that you're using CGI, and also, may get better SEO outta such a configuration. IF your example were real estate listings. you'd have /listings/NY/Albany/ instead of /listings.cgi?st=NY&city=Albany – Roy Rico Jul 31 '11 at 16:11
up vote 3 down vote accepted

Is this common behaviour?

It's your specific settings.

Solution: Options -MultiViews

Apache Manual says (you will have to scroll down a bit):

The effect of MultiViews is as follows: if the server receives a request for /some/dir/foo, if /some/dir has MultiViews enabled, and /some/dir/foo does not exist, then the server reads the directory looking for files named foo.*, and effectively fakes up a type map which names all those files, assigning them the same media types and content-encodings it would have if the client had asked for one of them by name. It then chooses the best match to the client's requirements.

And should be this (execution without suffix) disabled?

Up to you. By default such behaviour is disabled.

share|improve this answer
Aaaa... Thanks!! I searched manual of mod_fcgid but totally forget about common apache directives.. THANKS! – vladimirm Jul 31 '11 at 16:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.