ThinkPHP in SAE about url rewriting thinkphp. The root directory contains config. yaml (because SAE does not support. htaccess) content: name: & nbsp; thinktestversion: & nbsp; 1 handle: & nb ThinkPHP url rewriting in SAE
Thinkphp.
The root directory contains config. yaml (because SAE does not support. htaccess)
Content:
That is, page jump.
Test.html and test. php are available under Tpl/default/Index /.
After the jump, the system will not access test. php.
If it is test.html under the root directory, it will be okay.
Is it related to the scope of config. yaml? Is there another reason?
Answers from experts!
------ Solution --------------------
The pseudo-static state of thinkphp is implemented through PATH_INFO.
The only thing that requires url rewriting is to hide the index. php file name.
Thinkphp is a single portal, so there will be no URLs such as http: // serverName/test. php
This either from
. Htaccess
RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L]
Or config. yaml
-Rewrite: if (! Is_dir ()&&! Is_file () & path ~ "^ (. *) $") Goto "index. php/$1"
It can be seen that he converts all content outside the domain name to the index. php parameter.
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