[已解决].htaccess 怎么写404?

浏览:4988 发布日期:2015/01/08 分类:技术分享
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{SERVER_PORT} 80 [NC]
RewriteCond %{HTTP_HOST} !^www.xxx.com$ [NC]
RewriteRule ^(.*)$ http://www.xxx.com/$1 [L,NC,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.(js|gif|jpg|png|css|swf|txt|php|html)(.*))$
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L,NC]
ErrorDocument 404 /index.php?m=Empty
</IfModule>

还是自己解决了,分享出来,帮助要用到的人
最佳答案
评论( 相关
后面还有条评论,点击查看>>