feelexit
06-06-2007, 10:38 AM
all my php files in theme folder, and images in images folder
http://localhost/theme/
http://localhost/theme/images
I use .htaccess rewrite my ugly url.
http://localhost/theme/category.php?type=movie
http://localhost/theme/category/movie
url works, but all the images in the category.php file cannot be displayed.
in the header.php file, I use <img src="images/logo.jpg">
now, after I rewrite the url, this image file cannot be found. cause, it try to find http://localhost/theme/category/images/logo.jpg
and category acutally does not exist.
I can change it to <img src="../images/logo.jpg">, but problem is header.php is the header file used for all other files.
index.php also use it,http://localhost/theme/index.php
if i change it to ../images/logo.jpg, then index.php couldnt find this image file.
is there a way to give the correct image path for all the files ?
http://localhost/theme/
http://localhost/theme/images
I use .htaccess rewrite my ugly url.
http://localhost/theme/category.php?type=movie
http://localhost/theme/category/movie
url works, but all the images in the category.php file cannot be displayed.
in the header.php file, I use <img src="images/logo.jpg">
now, after I rewrite the url, this image file cannot be found. cause, it try to find http://localhost/theme/category/images/logo.jpg
and category acutally does not exist.
I can change it to <img src="../images/logo.jpg">, but problem is header.php is the header file used for all other files.
index.php also use it,http://localhost/theme/index.php
if i change it to ../images/logo.jpg, then index.php couldnt find this image file.
is there a way to give the correct image path for all the files ?
