Remove index.php or index.html from URL or Website
How to remove index.php or index.html from URL or website easily
Start From Here ( 5 MINS READ TIME )
Add The following code in .htaccess file to remove (index.php or index.html) from URL or Website Easily
Example if your website is opening like this :
"https://www.yourwebsite.com/index.html" or "https://yourwebsite.com/index.html" or "www.yourwebsite.com/index.html"
or
"https://www.yourwebsite.com/index.php" or "https://yourwebsite.com/index.php" or "www.yourwebsite.com/index.php"
& you want to remove index.html /index.php link from URL & Website then add below code in your site's root .htaccess file:
RewriteCond %{REQUEST_URI} !/$
After adding your website will look like: (example)
"https://www.yourwebsite.com" or "https://yourwebsite.com" or "www.yourwebsite.com"
Note: Replace “yourwebsite.com” with your actual or your domain name wherever required.
Note: Backup your current .htaccess file and then add these rules.