我电脑中的域是:http
://www.laji.com
www 文件夹下有 2 个文件
.htaccess
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# All other pages
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg)$
RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]
索引.php
<?php echo $_GET['main_page'] ?>
当我访问http://wwww.laji.com/xxx.jpg(这个jpg不存在)时,它重写为 index.php?main_page=xxx.jpg ,但我想让它显示404信息,不需要重写,为什么我的 htaccess 代码不起作用?