I have this code in my .htaccess
file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?link=$1 [L]
</IfModule>
And I am getting 404 although I can acces it with non-pretty url like this index.php?link=somepage
My full url is http://www.website.com/subfolder/index.php?link=somepage
I have Apache 2.4.18 on Ubuntu 16 and mod_rewrite
module is loaded.
Update
Also when I try with this:
RewriteRule ^ index.php [L]
Then I can access it with http://www.website.com/subfolder/?link=somepage
So this way it works when just removing index.php
Is it possible that some additional configuration has to be set on server?