Remove (.html) or (.php) from Website URL or link
How to Remove (.html) or (.php) from Website URL or link .
![Remove (.html) or (.php) from Website URL or link](https://www.freeseocheckers.com/blog/uploads/images/202104/image_750x_60783545a2332.jpg)
Start From Here ( 5 MINS READ TIME )
Add The Below code in .htaccess file to remove (www.abc.com/about.html or www.abc.com/about.php) from URL or Website Easily
Example if your website is opening like this :
"www.abc.com/about.html" or "www.abc.com/about.php"
& you want to remove .html or .php extension from URL & Website then add below code in your site's root .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1 [R=301,L,NE]
After adding your website will look like: (example)
"www.abc.com/about"
Note: This code will also help in redirections if some opens ( "www.abc.com/about.html") by force it will redirect to ("www.abc.com/about") . This will save you from Duplicate Website Content Issues.
Note: Backup your current .htaccess file and then add these rules.
What's Your Reaction?
![like](https://www.freeseocheckers.com/blog/assets/img/reactions/like.png)
![dislike](https://www.freeseocheckers.com/blog/assets/img/reactions/dislike.png)
![love](https://www.freeseocheckers.com/blog/assets/img/reactions/love.png)
![funny](https://www.freeseocheckers.com/blog/assets/img/reactions/funny.png)
![angry](https://www.freeseocheckers.com/blog/assets/img/reactions/angry.png)
![sad](https://www.freeseocheckers.com/blog/assets/img/reactions/sad.png)
![wow](https://www.freeseocheckers.com/blog/assets/img/reactions/wow.png)