I’m trying to perform this task for my server, but I could not realize how to do it.
I need to redirect any url to url.php. For example, to redirect domain.com/about to domain.com\about.php.
I’ve always used this code, that’s working fine for me:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^([^\.]+)$ $1.php [L]
The problem is that I need to do the same for domain.com/api/. In the API folder.
I tried changing the script and adding other similar line but it’s not working as it should.
Thank you in advance.
Change
RewriteBase /toRewriteBase /api/and everything should be fine (api/about.php etc are called out)