I have the following .htaccess file in my root folder:
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
DirectoryIndex index.php
ErrorDocument 404 /not-found.php
RewriteEngine On
RewriteBase /
RewriteRule ^@([^/]+)$ /users.php?username=$1
RewriteRule ^@([^/]+)/followers$ /followers.php?username=$1
RewriteRule ^@([^/]+)/highlights$ /highlights.php?username=$1
RewriteRule ^posts/([^/]+)(|/)$ /posts.php?id=$1
RewriteRule ^([^\.]+)$ $1.php
If I write localhost in the address bar, it calls the index file correctly, but if I access the subfolder localhost/support/ it does not detect the index file that is in this folder.
If I delete the last line RewriteRule ^([^\.]+)$ $1.php it works, but I need it for the good functioning of other files.