Forum Moderators: phranque
The problem that I'm having is that after writting an RewriteRule on my .htaccess file, all relative paths in my html suddenly get broken
my directory file (on my local server) looks like the following:
root
¦--->folder1
¦----->images
the condition on .htaccess is:
RewriteRule ^viewsong/(.*)/(.*)/(.*).php /folder1/viewsong.php?song=$1&code=$2&traspose=$3
and now, when I want to add an image (on HTML) as
img src="images/whatever.png", the browser tries to find it on
[root...]
Anyone could give me some advice to fix this nasty thing (without doing a full path to the image, of course)
best regards - julian
This is a server relative path:
src="/images/whatever.png"
Starts root location => request will always be /images/whatever.png
Better to use server relative locations when rewriting/redirecting.
Justin