Url path after thinkphp jump-php Tutorial

Source: Internet
Author: User
For the url path problem after thinkphp jump, download a project zip package from the company server, decompress the package, and run it in your local environment. it is a wamp package. The problem is:
Input address Localhost/MyApp/index. php/AdminGo to the background homepage smoothly, but click a topic or page, and the url becomes Http: // localhost/Admin/Coupon/lists/menuid/24/menupid/23In this form, MyApp/index. php is missing. how can this part be solved?


Reply to discussion (solution)

It is estimated that he has rewritten the url to shield the entry file, so there is no need to change it.

It is estimated that he has rewritten the url to shield the entry file, so there is no need to change it.


So how can I make it run normally in my local environment?

It is estimated that he has rewritten the url to shield the entry file, so there is no need to change it.


The main reason is that I have reported an error in another column and it cannot be used.

Http: // Localhost/MyApp/Admin
Can this happen?

In the Conf Directory of the current module of thinkphp, if URL_MODEL is set to 3 and 2, the rewrite mode is used, and index. php is hidden.

Http: // Localhost/MyApp/Admin
Can this happen?


No, it cannot be found.

In the Conf Directory of the current module of thinkphp, if URL_MODEL is set to 3 and 2, the rewrite mode is used, and index. php is hidden.


If you want to change this configuration file, do you want to change other configuration files, such as apache's


It is estimated that he has rewritten the url to shield the entry file, so there is no need to change it.


The main reason is that I have reported an error in another column and it cannot be used.


Check whether there are any rewrite rules for blocking the entrance file in. htaccess. if you have any rules for setting URL_MODEL in config. php, I forgot the parameters. check the manual.


Http://document.thinkphp1.cn/manual_3_2.html#url
You need to find the corresponding module, such as/Application/Admin/Conf/config. php: open the file and check whether URL_MODEL is configured. if not, add the configuration and change URL_MODEL to compatible mode.


Http: // Localhost/MyApp/Admin
Can this happen?


No, it cannot be found.

This indicates that you have not enabled the url rewriting function, at least not using thinkphp. . HtaccessFile



Http: // Localhost/MyApp/Admin
Can this happen?


No, it cannot be found.

This indicates that you have not enabled the url rewriting function, at least not using thinkphp. . HtaccessFile


At first, I put the htaccess file and modified the apache configuration. It seems useless


Http://document.thinkphp1.cn/manual_3_2.html#url
You need to find the corresponding module, such as/Application/Admin/Conf/config. php: open the file and check whether URL_MODEL is configured. if not, add the configuration and change URL_MODEL to compatible mode.


The URL_MODEL of this project is set to 2.

Since URL_MODULE and. htaccess both have them, check whether the documentroot in httpd. conf points to the root directory. if it is the root directory, add/MyApp

In the TP framework, the path is set. do you have a look at the path index. php? M =... & a =... indicates the controller name and method name.

In the TP framework, the path is set. do you have a look at the path index. php? M =... & a =... indicates the controller name and method name.


I know this, but there is no index. php or project name on any other page.

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.