How to modify the site default home page by. htaccess? _php Tutorials

Source: Internet
Author: User
Tags smarty template
Often meet the site after the customer asked to add a Site Guide page, But the site's index.php has been defined, so have to find a way to skip index.php this page, in addition to set up a home page, in addition to using the Site management Control Panel to set the site default home page priority, this article will share another method to modify the default homepage of the site, through the. htaccess Modify the site First, the specific steps are as follows:

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 the modification, upload the file to the root directory of the website.

Note: You can also set the home page file to a different suffix and name, for example: pagename.html, INDEX.PHP3, Message.pl and so on, in addition, to make the. htaccess file effective, the host or space support for the site must be required. htaccess file, no, you can contact the space provider to open this feature!

Articles you may be interested in

    • Set the site default home page by. htaccess
    • Use. htaccess to deny an IP access to a Web site
    • Compress website js and CSS files using PHP's gzip compression to speed up website access
    • How to use the. htaccess anti-theft chain website pictures
    • Htaccess how to set up a picture of a directory in an anti-theft chain
    • 10 sections of practical. htaccess Code Snippets
    • How constants defined by define in the program are used in the Smarty template
    • MySQL Slow log to analyze the high CPU consumption problem

http://www.bkjia.com/PHPjc/764189.html www.bkjia.com true http://www.bkjia.com/PHPjc/764189.html techarticle often meet the site after the customer asked to add a Site Guide page, but the site's index.php has been defined, so have to find a way to skip index.php this page, in addition to set up a ...

  • 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.