I am using version 3.2. For example, my domain name is http://www.xxxxx.com/
The page of this domain name is the zhuye method under the zhuye controller. Now when I visit this page, I have Index.php and the module have been removed. Now you can access it like this http://www.xxxxx.com/zhuye/zhuye
This page is impossible because this zhuye/zhuye
page is the homepage of the site. Let the user enter the name of the controller and operation method to access it. So I want the user to directly access zhuye/zhuye
when they enter http://www.xxxxx.com/
When accessing this page, the domain name should not show the controller and operation method names. However, if the controller and operation method names are removed and the domain name is used to access directly, it will be the access entry file. How should this homepage be set up so that the controller and operation method names do not appear? ? Should I use redirection? If so, how should this rule be written?
The configuration file sets the default controller and methods, please read more about the configuration file.
This question involves two points:
URL rewriting has nothing to do with the TP framework, it is mainly about WEB server configuration,
Apache:
Nginx:
Modify the tp framework URL mode configuration: URL_MODEL, your requirement should be
pathinfo
modeIf you have a single module, you can bind the entry in the index.php file
Some methods have been provided above!
You can also add tp routing to route the homepage to zhuye/zhuye