1

I have the domain example.com with several external domains pointed to it in different directories.

I have the following RewriteRule

RewriteEngine on

RewriteMap urlmap txt:/var/www/html/map.txt
RewriteRule ^(.*)$ ${urlmap:%{HTTP_HOST}}/$1

The problem with this is that I cannot open files without adding the .php extension to the end of the URL.

For example, cool.com points to example.com/someuser and that works fine - probably because it automatically points to index.php.

If I choose to visit cool.com/file, I am greeted with a 404 error:

The requested URL /someuser/file.php was not found on this server.

However, if I choose to visit cool.com/file.php, everything works perfectly for some reason.

How could I fix this?

Osman
  • 165
  • 1
  • 10

0 Answers0