RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$
RewriteRule .* /not/found/image [L]
这是我用来替换任何未找到的图像的代码,但是假设我只想替换名为image01.jpg
的图像并且找不到它。我如何只替换该图像名称?
先谢谢坦率地说:)
答案 0 :(得分:1)
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} image01\.jpg$
RewriteRule .* /not/found/image [L]