I am a novice, I use LAMP configured in the pagoda panel and upload thinkPHP 3.2.3 (the code is available for testing in wamp).
Visit http://www.xxx.me/Home/Index/... and directly report the error File not found, the console shows:
Failed to load resource: the server responded with a status of 404 (Not Found)
The .htaccess at this time is the default
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/ [QSA,PT,L]
</IfModule>
After modifying .htaccess to the following, you can access http://www.xxx.me/Home/Index/...
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=/ [QSA,PT,L]
</IfModule>
However, images and js quoted from public cannot be displayed. For example, the console displays
http://kusima.me/public/js/jq... Failed to load resource: the server responded with a status of 404 (Not Found)
Opening http://www.xxx.me/public/js/j... directly will report an error
Unable to load module: Public
Supplementary instructions:
The file directory is the default for TP as follows
The entry file is the default definition
//Define the application directory
define('APP_PATH','./Application/');
[Apache] also has corresponding configuration
The mod_rewrite.so module is loaded in the httpd.conf configuration file
AllowOverride None Change None to All
The url mode has been set in the configuration file
'URL_MODEL' => 1,
All of this was tested in wamp without error.
Please tell me, I don’t know where I went wrong? ?
为情所困2017-05-24 11:34:12
Thank you all.
I found out the reason myself. Pay attention to strict case sensitivity in Linux.
Made a stupid mistake.