【发布时间】:2011-05-27 13:27:38
【问题描述】:
我使用以下内容重写我的网址:
RewriteCond %{THE_REQUEST} \.html
RewriteRule ^(.+)\.html$ /$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.+)$ $1.html
问题是这会导致 css 和图像不出现 - 有没有办法可以将规则从 css 和 images 文件夹等文件夹中排除,以便按应有的方式显示而不是死图像而不是 css? 谢谢天使xx
【问题讨论】:
-
看起来像第二个
RewriteCond中的类型。\.html之前应该有空格吗? -
你能显示一个不起作用的 CSS URL 吗?在浏览器中打开它会发生什么?
标签: css image apache mod-rewrite