thinkphp Why access Path error, you can also access

Source: Internet
Author: User

In learning to access the portal file, you should actually visit public\index\index\ but can also access application, admin, Controller\index, also can be displayed under the Web page

Principle: Public\.htaccess Apache configuration file is a configuration file in Apache server, it is responsible for the configuration of the Web page in the related directory

Basic explanation can be on Baidu: https://baike.baidu.com/item/htaccess/1645473

<ifmodule mod_rewrite.c>
Options +followsymlinks-multiviews
Rewriteengine on # Open rewriteengine with static engine

Rewritecond%{request_filename}!-d is not accessing a directory or directory that does not exist
Rewritecond%{request_filename}!-f is not accessing a file or file that does not exist
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l] that is transferred to index.php processing, followed by and as a parameter processing
</IfModule>

This is a little bit of knowledge, but why should I write it down?! Actually, given the state of my boom today. Encountered a lot of small problems, quickly after work, I suddenly realized that I am a rookie, I need to have a place to take notes, but also to share with each other to learn.

thinkphp Why access Path error, you can also access

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.