For example your original path is http://localhost/app/index.php/module/action/var/value/
So now the address is http://localhost/app/module/action/var/value/
remove index.php
1 . The mod_rewrite.so module is loaded in the httpd.conf configuration file //in Apache to configure the
#LoadModule rewrite_ Module modules/mod_rewrite.so Remove the previous siren from
2 . AllowOverride none say None to all //in Apache inside to configure ( Note that other places allowoverride are all set to all)
allowoverride none Change allowoverride all
Options None
Order allow,deny
allow from all
3 . Make sure Url_model is set to 2 and write in the project's configuration file
Return Array (
' url_model ' = ' 2 ',
);
4 .htaccess file must be placed in the following directory
This file added:
rewriteengine on
Rewritecond%{request_ FILENAME}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
thinkphp Remove index.php