Wednesday, 2 October 2013

All images including background disappears

All images including background disappears

I have two links and ReWrite rules for them. And the rules do change the
links. But all the images including the background disappears.
This code
#/viewgallery.php?cname=Colorado-Fall to /photos/Colorado-Fall RewriteCond
%{THE_REQUEST} ^[A-Z]{3,}\s/+viewgallery\.php\?cname=([^&\s]+) RewriteRule
^ /photos/%1/? [L,R=301] RewriteRule ^photos/([^/]+)/?$
/viewgallery.php?cname=$1 [L,NC,QSA]
changes
http://www.xyz.com/viewgallery.php?cname=Colorado-Fall
to
http://www.xyz.com/photos/Colorado-Fall/
Then this
# /viewgallery.php?cname=Colorado-Fall&pcaption=Poked to
/photos/Colorado-Fall/Poked.jpg
RewriteCond %{THE_REQUEST}
^[A-Z]{3,}\s/+viewgallery\.php\?cname=([^&]+)&pcaption=([^&\s]+)
RewriteRule ^ /photos/%1/%2/? [R=301,L]
RewriteRule ^photos/([^/]+)/([^.]+)/$
/viewgallery.php?cname=$1&pcaption=$2 [L,NC,NE]
changes the link
http://www.xyz.com/viewgallery.php?cname=Colorado-Fall&pcaption=Facing-Colors
to
http://www.xyz.com/photos/Colorado-Fall/Light-On-Fall-Colors/
What am I doing wrong here? I am using absolute paths in my PHP code.Like
these..
"<a
href=/viewgallery.php?cname=$cname&pcaption=".$caption_array[$next]."><img
src=/photos/assets/left.png border=0 ></a>";

No comments:

Post a Comment