.htaccess Multiple directories load the same page

I have the follow php files:

www/
  -prueba.php
  -prueba-verificador.php
  -contenido.php

and the follow .htaccess file:

ErrorDocument 404 /quimica/404.php
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /
RewriteRule ^([0-9A-Za-z]*)/$ $1.php
RewriteRule ^([0-9A-Za-z]*)/([0-9A-Za-z]*)/$ $1-$2.php
RewriteRule ^([0-9A-Za-z]*)/([0-9A-Za-z]*)/([0-9A-Za-z]*)/$ $1-$2.php/$3

when I access to site.com/prueba/ or site.com/contenido/ works fine, load prueba.php and contenido.php but when I access to site.com/prueba/verificador/ load prueba.php instead of prueba-verificador.php

How I can fix this?

Upvotes: 1

Views: 76

Answers (1)

Croises
Croises

Reputation: 18671

Add this to disable MultiViews:

Options -MultiViews

The Apache docs on mod_negotiation, describes what the Multiviews Option does, when enabled:

If the server receives a request for /some/dir/foo and /some/dir/foo does not exist, then the server reads the directory looking for all 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 returns that document.

Upvotes: 1

Related Questions