2011-09-20 6 views
3

다음 코드내 mod_rewrite를 기본 이미지 뭐가 문제

이 도와주세요 작동하지 않는 몇 가지 이유를 들어 default.gif 모든 존재하지 않는 이미지를 리디렉션해야합니다.

<IfModule mod_rewrite.c> 
RewriteEngine On 

RewriteBase /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> 

답변

1

이 시도 :

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]