Answer the question
In order to leave comments, you need to log in
Why does the server accept /index as a folder if there is no such folder?
On the CNC site it is arranged like this: "mysite.com/contoller/action"
For example mystite.com/user/registration
Here's the problem:
There is an IndexController controller.
When I was working with MAMP (on a Mac) this controller was called normally (mysite.com/index)
But recently I switched to Vagrant and raised the Ubuntu 14 server.
Now all controllers are called normally except IndexController (mystite.com/index)
The server gives this error:
Not Found
The requested URL /index was not found on this server.
But if the word "index" is capitalized in the url, then the controller will be called.
here is my .htaccess file:
RewriteBase /
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php?q=$0 [QSA,L]
Please help me solve the problem.
Thank you.
Answer the question
In order to leave comments, you need to log in
try this
RewriteBase /
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
RewriteRule !\.(js|ico|gif|jpg|png|css|pdf|mov|mp3)$ index.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question