There are two requirements. 1. http automatically jumps to https2.index. php to block the thinkphp framework. There are two Thanks requirements.
1. http automatically redirects to https
2. Disable index. php and use the thinkphp framework.
Thanks
Reply content:
There are two requirements.
1. http automatically redirects to https
2. Disable index. php and use the thinkphp framework.
Thanks
We recommend that you view the relevant documentation. The http://www.htaccesseditor.com/ SC .shtml here provides a web that can be generated online.
Supplement: http://hi.baidu.com/honfei/item/0893a6e12984903a4ddcafbc
1. Redirect http directly to https
RewriteEngine onRewriteCond %{SERVER_PORT} !^443$RewriteRule ^(.*)?$ https://%{SERVER_NAME}/$1 [L,R]
2. TP shields index. php
For Apache, you must add the. htaccess file at the same level as the entry file. The content is as follows:
RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
Nginx Environment
In earlier versions of Nginx, PATHINFO is not supported, but you can configure forwarding rules in Nginx. conf:
Location /{//..... Omit part of the Code if (! -E $ request_filename) {rewrite ^ (. *) $/index. php? S = $1 last; break ;}}
ThinkPHP manuals are described. You are advised to take a closer look :)