I have a link https://example.com/src/index.php, and want index.php, and other pages, which are in src folder, to be accessible without src in the URL.
My .htaccess file:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteRule ^([^\.]+)$ $1.html [NC,L]
.htaccessfile an attempt at a solution? Those directives (although incorrect) would imply you are implementing extensionless URLs, although this is not stated in your question?