Page 1 of 1

htaccess - site with lots of /dir1/di2 - show image on root?

Posted: Tue Jan 19, 2010 10:08 am
by Consolas
Hello

I didn't want to overcharge the other thread thus created this one.

Since I have a site running with htaccess and therefore a lot of rewrites ( site.com/dir1/dir2/dir3...) how can I have a root image (for instance) path?

I was using something like define('ROOT_PAHT',"/"); and then would place on each image the ROOT_PATH variable before the img/name_of_image.jpg path.

Tried "./" as well but I'm afraid the path will still be relative to the present url showing.

Is there a better way to do this? Do I need to create a subdomain just for the images? Like images.site.com and point that to the /img folder?

Thanks to all