How does one modify the default homepage of a website through. htaccess? _ PHP Tutorial

Source: Internet
Author: User
Tags high cpu usage smarty template
How can I modify the default homepage of a website through. htaccess ?. After the website is completed, the customer often asks to add a website boot page, but the index of the website. php has already been defined, so you have to try to skip the index. for the php page, after setting a website that is frequently encountered, the customer requests to add a website boot page, but the index of the website. php has already been defined, so you have to try to skip the index. in addition to setting the default homepage priority in the control panel of website management, this article will share another method to modify the default homepage of a website, pass. to modify the default homepage of a website, follow these steps:

1. create a new. htaccess file and add the following code to the file:

DirectoryIndex home.html index.htm index.php index.cgi

2. after modification, upload the file to the root directory of the website.

Note: You can also set the homepage file to another suffix and name, such as pagename.html and index. php3, message. pl and so on. the htaccess file takes effect and must be supported by hosts or spaces that store the website. if the htaccess file does not work, contact the space provider to activate this function!

Articles you may be interested in
  • Set the default homepage of a website through. htaccess
  • Using. htaccess to deny access to a website from an ip address
  • Use the GZip compression function of PHP to compress website JS and CSS files to accelerate website access.
  • How to use. htaccess anti-Leech website images
  • . Htaccess: how to set images in a directory of anti-Leech
  • 10 practical. htaccess code snippets
  • How to use constants defined by define in a program in a smarty Template
  • Use MySQL Slow Log to analyze the high CPU usage of MySQL

...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.