LAMP configured in the Pagoda panel, when uploading thinkPHP, the error "File not found" is reported when accessing, and when .htaccess is modified, the resource cannot be loaded.
怪我咯
怪我咯 2017-05-24 11:32:12
0
2
2000

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? ?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
为情所困

Thank you all.
I found out the reason myself. Pay attention to strict case sensitivity in Linux.
Made a stupid mistake.

  • reply I also have this problem, please tell me how to solve it
    star_辰 author 2018-11-05 14:03:38
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template