1 / 7

How to Change Default Index Page Apache

Here is how to change default index page in .htaccess for your website.<br><br>#apache #webdevelopment #linux <br><br>Visit https://ubiq.co/tech-blog/how-to-change-default-index-page-in-apache/

Télécharger la présentation

How to Change Default Index Page Apache

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. How To Change Default Index Page in Apache

  2. Open Apache Configuration Apache configuration file is present at one of the following locations depending on your installation: /etc/apache2/httpd.conf /etc/apache2/apache2.conf /etc/httpd/httpd.conf /etc/httpd/conf/httpd.conf Open terminal and run the following command to open Apache configuration file $ sudo vi /etc/apache2/httpd.conf

  3. Change Default Index Page You will see the following lines of code. <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> Change index.html index.php to your choice of web page (e.g home.html). <IfModule dir_module> DirectoryIndex home.html </IfModule>

  4. Change default index page using .htaccess You can also change default index page for Apache using .htaccess. Before proceeding, please enable mod_rewrite (.htaccess) in your Apache web server. Open .htaccess file, typically located at /var/www/html/.htaccess $ sudo vi /var/www/html/.htaccess

  5. Change Default Page Using .htaccess Add the following line to .htaccess file to set index page to home.html. DirectoryIndex home.html

  6. Restart Apache Web Server Restart Apache web server to apply changes. $ sudo service apache2 restart

  7. Thank You Visit for details https://ubiq.co/tech-blog/how-to-change-default-index-page-in-apache/

More Related