tp5 file path will wear index or admin, resulting in an error loading images like css

Tried many methods, found that the basic problems are due to .htaccess, as long as you can hide index.php, so the following code to modify .htaccess

<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond $1 !^(DATA|images|otherThings)
    RewriteRule ^(.*)$ index.php?s=/index/$1 [QSA,PT,L]
</IfModule>

Guess you like

Origin www.cnblogs.com/seanpan/p/11311350.html