banner



How To Create A Clean Htaccess File For Html Pages

The server looks for specifically named files as the first page of your website, too known as the index page. The default order of index file names our particular servers look through is alphabetize.htm, alphabetize.html, index.php, and finally default.htm. You can modify the name of the index file your account looks for by altering the .htaccess file. Perhaps y'all want to accept a specific custom name for your alphabetize file or maybe you lot are migrating from another host and the index page is named differently. This mode your internal links will not exist broken by renaming the index file.

Don't accept fourth dimension to read the commodity on how to modify your default index folio in .htaccess? Lookout our walk-through video.

What is an htaccess File?

The .htaccess file is a hidden text file within your hosting account that can be very powerful. It is designed so that you tin can modify information technology to alter the behavior of your website that normally would take higher access beyond your account. It acts as a liaison between your domain and the server and can perform many functions.
Learn more almost htaccess

Changing your Default Index File via htaccess

  1. Log into your cPanel.
  2. Detect the Files category and click on the File Manager icon.
    cpanel
  3. Click Settings at the top right corner.
    cpanel
  4. Select the certificate root for the domain you are working with and exist sure the checkbox side by side to Show Subconscious Files is checked. Click the Save button.
    file-manager-show-hidden
  5. Await for the .htaccess file and right click on it. This brings upwards a menu. Find and click on the Edit selection.
    file-manager-htaccess
  6. You may be presented with a popup. Click on the Edit button. file-manager-htaccess
  7. You are at present in the htaccess editor. Paste the post-obit lawmaking at the acme of the page to configure your desired index folio. In our instance below, we decided to make the index page of our folders named first.html.
    #Alternate default alphabetize page DirectoryIndex first.html

    You can also list more than ane file in the configuration. The file will be read left to right and check for them in that guild. In this example, we add index.htm, index.html, and index.php to the listing. Commencement the server volition check for first.html, if it does not find a file with that name, information technology continues to index.htm and then on.

    #Alternating default alphabetize pages DirectoryIndex first.html alphabetize.htm alphabetize.html alphabetize.php
  8. Exist certain to hit the Save Changes push in the upper correct corner to salvage your new htaccess configuration.

Source: https://www.inmotionhosting.com/support/website/htaccess-change-index-page/

Posted by: holderhavelf.blogspot.com

0 Response to "How To Create A Clean Htaccess File For Html Pages"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel