thinkphp error Failed to load resource 404 (Not Found), the error still occurs after modifying .htaccess
漂亮男人
漂亮男人 2017-05-24 11:32:14
0
2
1296

The default .htaccess is

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/ [QSA,PT,L]
</IfModule>

At this time, visit http://mydomain.me/home/index... and directly report the error Failed to load resource: the server responded with a status of 404 (Not Found) as shown below

After adding index.php, http://mydomain.me/index.php/..., the page can be accessed, but the error is reported as shown below

After modifying .htaccess, it can be accessed without index.php, but an error is still reported, the same as the picture above.

<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ index.php?s=/ [QSA,PT,L]
</IfModule>

What is the reason? How to break it?

漂亮男人
漂亮男人

reply all(2)
phpcn_u1582

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

曾经蜡笔没有小新

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Try this and try removing the IF ones.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template