How to remove file extensions
Hello all i made this post to show you how to remove file extensions like [ www.example.com/index.php ] now i will show you how to remove .php in the end file to be [ www.example.com/index ] it will help your clients to open your website now follow this steps :
open new Notepad
save this code in new notepade
RewriteEngine On
# Unless directory, remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ https://yourwebsitelink.com/$1 [R=301,L]
# Redirect external .php requests to extensionless url
RewriteCond %{THE_REQUEST} ^(.+)\.php([#?][^\ ]*)?\ HTTP/
RewriteRule ^(.+)\.php$ https://yourwebsitelink.com/$1 [R=301,L]
# Resolve .php file for extensionless php urls
RewriteRule ^([^/.]+)$ $1.php [L]
Now change https://yourwebsitelink.com with your website link there is two to changeing
Save the Notepade with name .htaccess and uploade with your website files and see what will happend