Home >> .htaccess >> How can I change the default start page in .htaccess

How can I change the default start page in .htaccess

By default start page is index. This means that this page will be shown first when you access your domain. Furthermore, index.php will always be shown before index.html, meaning that for example your PHP site is shown and not your Website Builder (HTML) site.

Step 1. Enable mod_rewrite on your Apache web server.

Step 2. Create .htaccess file in root directory.

Step 3.Update default page for your website home.html in .htaccess file

       DirectoryIndex home.html

Step 4. Restart Apache Server  
        sudo service apache2 restart      

Post Your Comment

Next Questions
How To Block Or Allow Ip Addresses From Accessing Your Site
How To Protect Password Of Directories
How To Redirect Http To Https
How To Redirect Http:// To Https://www
How To Redirect Non www To www
How To Redirect One Domain To Another Domain
How to Remove index.php from URL
How To Redirect Homepage To Another Website
How To Redirect To Another Directory Within Same Domain
How To Set Environment Variable
How To Set The Php Config Variables
How To Set Display_error Off
How To Block Few Ip Address
How To Redirect To Error/404.html When 404 Errors Comes
How To Set The Caching For Javascript/images/css
What Is Meaning Of 301, 302, 400, 401, 403, 404 And 500 Error Codes
Forcefully redirect http to https
Creating a Custom 404 Error Page
How to URL Rewrites
How to make SEO friendly URL
How to Remove php extension from URL
How to Remove HTML extension from URL
How to Remove File Extension

Copyright ©2022 coderraj.com. All Rights Reserved.