Ubuntu under configuration thinkphp hidden index.php

Source: Internet
Author: User

Http://doc.thinkphp.cn/manual/url_rewrite.html

The above links are the steps provided in the framework manual, while the Ubuntu Apache environment differs from windows and other Linux

1. Turn on the mod_rewrite.so module

With sudo a2enmod, you can configure the module management, and then enter rewrite, the mod_rewrite.so module is turned on.

2.AllowOverride Change to all

sudo vim/etc/apache2/apache2.conf, turn on Find allowoverride,i Modify, Esc colon Wq save.

If it is not here, press the following:

sudo vim/etc/apache2/sites-enabled/000-default.conf find allowoverride, modify save

3. Copy A. htcaccess to index.php path according to the manual.

4. Restart Apache:service apache2 Restart

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.