mod_rewrite

hadyabed

Active Member
#1
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
 

mistwang

LiteSpeed Staff
#4
You need to enable rewrite logging to check which rewrite rule failed unexpectedly.

add

RewriteLogLevel 9

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