0

I used this code in my .htaccess for the entire time:

Options -Indexes

ErrorDocument 404 /404error.php

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

It worked fine and I could use the filenames in the url without the extension. But out of nowhere the code stopped working and the same url (/index) brought me to, instead of the /index.php to the /index.css. (This effects only me local apache - The online server works still fine) Why did it stopped working and how can I fix it?

Thanks in advance - Jojo

2
  • have you checked your server log? I know sometimes if you dont use any other directives with indexes in apache you can get strange behavior. Commented Nov 8, 2017 at 22:01
  • nothing there :( But thanks Commented Nov 8, 2017 at 22:31

1 Answer 1

1

I found this: Content Negotiation

In my .htaccess I disabled MultiViews like this

Options -MultiViews

and it worked fine!

-- Problem solved :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.