The pages load without any trouble when there is the .php extension with the URL but it gives error Not Found while trying to access the same page without .php extension.
.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Before posting this I have searched a lot.
- mod_rewrite for removing .php extension is producing 404 error
- Using .htaccess for remove .php extension but folder access returns 404
- getting 404 error when removing file extension worked on wamp but not working on lamp
- Removing URL .php extension gives 404 error
Thanks for your help.