In this tutorial, you will run “How to remove .php, .html extension using .htaccess file”. Many times we try to make our site more user and search-engine friendly. If you want to increase the indexing of your site in the Google search engine, you need to make your site search engine friendly. In this tutorial, I will show you a simple step to edit the .htaccess file.
How To Get Your Free Domain Watch Video:
• Free Web Hosting …
Website:
https://www.hzmfr.com/🌐
***SOURCE CODE****
** If Website Files have the Same Extension
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
** If Website File has Different Extension
RewriteEngine On
RewriteRule ^1stFILE 1stFILE.php
RewriteRule ^2ndFILE 2ndFILE.htm
RewriteRule ^3rdFILE 3rdFILE.html
*Important Note*
Please Always use Unique file names otherwise you me face errors and some files may not work
For: “SAMEFILE” and “SAMEFILENAME” will always open the “SAMEFILE” as 1st 8 characters of both files do match
Likewise, if you have two files “PROMOTIONS” and “PROMO” then “PROMO” will be executed
Must be a File name Unique Like “SAMEFILE” / “SUMFILE” / “SEFILE” / “MYFILE” Then you can use Multiple RewriteRule for each extension and it will work
Feature of .htaccess
With a .htaccess file, you can:
-you can redirect the user from the current domain to another domain
-you can redirect domain non-www to www or www to non-www
-you can redirect domain http to https or https to http
-Password protects a specific directory
-Block users by IP
-Preventing hot linking of your images
-rewrite URIs
#Rewrite #RewriteEngine #RewriteCond #RewriteRule #php #html #htm #Extension #Extensions #htaccess