thinkphp Implementing URL Rewrite
To implement URL rewrite with thinkphp, the directory structure for project Hello is as follows:
Http://localhost/hello/index.php/User/login, this link is possible.
Http://localhost/hello/User/login, this link is not possible.
Http://localhost/hello/User/login
Changes to the Apache httpd.conf file:
LoadModule rewrite_module modules/mod_rewrite.so Enabled
Options FollowSymLinks
AllowOverride All
Order Allow,deny
Allow from all
Modify AllowOverride to All
The contents of the file conf/config.php are as follows:
Return Array (
' Url_model ' = 2
);
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.