I am trying to rewrite the url for a rest call (backend written in php). The problem is, that the .htaccess file is not working, or the file in general is ignored by the server.
What i've tried
I've edited the httpd.conf file and changend following lines:
<Directory />
Options All
AllowOverride All
</Directory>
<Directory "${SRVROOT}/htdocs">
Options All
AllowOverride All
Require all granted
</Directory>
i also added a Directory
Tag for my specific folder:
<Directory "${SRVROOT}/htdocs/my/path/backend/">
Options All
AllowOverride All
</Directory>
My .htaccess file looks like this:
#.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.+) index.php/$1 [L,QSA]
Because i am using the RewriteEngine
i had to enable this module in the httpd.conf file:
LoadModule rewrite_module modules/mod_rewrite.so
Infos
I'm working on Windows 10 machine.
My Apache version is: 2.4.16 Win32
Problem
The problem is that the server ignores the .htaccess
file. I know that because i tried to change the DefaultIndex
with following line:
DirectoryIndex startPage.html
without any success.