All I want is to get rid of the index.php in the URL path.
The first is the configuration. htaccess
Copy Code code as follows:
<ifmodule mod_rewrite.c>
Rewriteengine on
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
</IfModule>
Because I am deployed on Apache, I need to find LoadModule rewrite_module in httpd.conf config file modules/mod_rewrite.so remove the front #, Find allowoverride None to allowoverride all.
The access localhost/product is now valid, but __app__ or __url__ or u get out of the path contains index.php, which is localhost/index.php, there is a step that needs to be conf/ Config.php inside Modify or add ' Url_model ' =>2,
And because I was trying to deploy the Conist Enterprise version 2.0 based on thinkphp, there was a configuration ' Url_model ' =>c (' token.false_static ') in config.php, and Token.false_ The value of the static is set to 1 at initialization time, so ... Pattern is still 1,pathinfo mode.
in the Sina SAE deployment , does not support. htaccess, only support its own profile config.yaml, so add the following rewrite format code in CONFIG.YAML:
Copy Code code as follows:
Handle
-Rewrite:if (!is_dir () &&!is_file () && path~ "^ (. *) $") goto "index.php/$1"
is not super simple, if you want to learn more about other pseudo static knowledge, please read the following article to recommend it.