1 hi, I want to implement the following rules:
All requests are directed to index.php
All resources (pictures, css, etc.) are directly accessed
How should I write my .htaccess? ? ? ?
世界只因有你2017-05-16 17:02:57
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,PT,L]
</IfModule>
Cond is like this. If the file or folder exists, access it directly.
OK, if it does not exist, rewrite the Rules and point them all to index.php