У меня есть проект в рамках стройных, где моя структура папок, как это:Apache2 правила перезаписи для удаления index.php из URL (Слим Framework)
root web directory
--project
-----api
-----vendor
-----index.php
-----.htaccess
Теперь моя проблема заключается в том, что я хочу, чтобы удалить индекс .php из моих URL-адресов API, чтобы у меня могло быть что-то вроде http://127.0.0.1/project/api/test вместо http://127.0.0.1/project/api/index.php/test. Моя .htaccess выглядит так, но не работает: RewriteEngine На
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
# RewriteBase/
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
разум, чтобы объяснить это немного? Кроме того, что произойдет с запросом Params? –