开发者

What is wrong with my mod_rewrite Default Image

Need to redirect all non-existing images to the default.gif For some reason the next code does not work

Please help.

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBa开发者_C百科se /jasper/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .*\.(jpg¦gif¦png¦bmp)$ /jasper/default.gif [L]    


RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /jasper/index.php [L]
</IfModule>


Try This:

RewriteEngine On
RewriteBase /jasper/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(jpeg|jpg|gif|bmp|png)$ /jasper/default.gif [L]

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /jasper/index.php [L]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜