Php 为什么我在.htaccess中使用mod_rewrite我的css文件不能使用?

Php 为什么我在.htaccess中使用mod_rewrite我的css文件不能使用?,php,.htaccess,rewrite,Php,.htaccess,Rewrite,我有这个网址: http://domain.com/index.php?type=item&id=656&title=mytitle 我想在.htaccess中将此url重写为: http://domain.com/item/656/mytitle 我在.htaccess中使用了这个规则: RewriteEngine On RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /index.php?type=$1&id=$2&title=

我有这个网址:

http://domain.com/index.php?type=item&id=656&title=mytitle
我想在.htaccess中将此url重写为:

http://domain.com/item/656/mytitle
我在.htaccess中使用了这个规则:

RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /index.php?type=$1&id=$2&title=$3 [L]
它已经工作了,但是
index.php
中我的
css
js
文件没有工作

我的css文件链接

<link rel="stylesheet" type="text/css" href="file/css/style.css" />

阅读有关RewriteCond的内容

# If the request is not for a valid file
RewriteCond %{REQUEST_FILENAME} !-f
# Then...
RewriteRule ...


您是否尝试过为js/css使用绝对文件路径?编辑:如果我错了,请纠正我,但该文件路径前面不应该有“/”或“../”吗?第一个允许查看所有文件(包括.php文件)。第二种方法只允许访问以file/css开头的url。您还可以将这两条规则结合起来。
# If the uri not starts with ...
RewriteCond %{REQUEST_URI} !^/file/css
# Then...
RewriteRule ...