mod_rewrite

Discussion in 'Install/Configuration' started by hadyabed, Apr 8, 2008.

  1. hadyabed

    hadyabed New Member

    My client owns a halo site. And they do dynamic images and use rewrite rules to parse the urls to a friendly way. But now the images don't load and the reason is because the mod_rewrite is not parsing right.

    Here is the .htaccess file:
    Code:
    Options +Indexes
    
    RewriteEngine On
    
    RewriteRule ^emblem_(.*).jpg  getEmblem.php?image=$1 [PT]
    
    RewriteRule ^ava_([0-1])_([0-9]+)_(.*).png$ avatarDisplay.php?type=$1&bg=$2&gt=$3
    
    RewriteRule ^exp_([0-9])_(.*).png$ expbardisplay.php?bg=$1&gt=$2
    RewriteRule ^exp_(.*).png$ expbardisplay.php?gt=$1
    
    RewriteRule ^userbar_(.*).png$ userbardisplay.php?gt=$1
    
    RewriteRule ^sig_([0-9]+)_(.*).png$ sig.php?gt=$2&pic=$1
    RewriteRule ^([0-9])_(.*).png$ sig.php?pic=$1&gt=$2
    RewriteRule ^(.*).png$ sig.php?gt=$1&pic=1
    
  2. mistwang

    mistwang LiteSpeed Staff

    Maybe have something to do with "[PT]" flag, you can try removing it.
  3. hadyabed

    hadyabed New Member

    I just tried that no luck. Do you think it has anything to do with the mod_rewrite engine?
  4. mistwang

    mistwang LiteSpeed Staff

    You need to enable rewrite logging to check which rewrite rule failed unexpectedly.

    add

    RewriteLogLevel 9

    in apache configuration, <virtualHost ...> section for that website.

Share This Page