I have the folloowing code for .htaccess
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
## hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^profile/
## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_FILENAME}.php [L]
##hide id parameter
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([A-Za-z0-9_])/([^/]*)$ /$1.php?id=$2 [L]
2 of my functions work properly, the hide id function however does not work, it should do the following: post.php?id=7 turned to post/7.
I am not very experienced with .htaccess. In fact I am unfamiliar with it, so I wanted to know how would I solve the issue of the above. Also this must not affect my POST and GET requests that I use as I have a ton of AJAX requests throughout every single page of the website.