biglittle — 2012-12-10T21:31:02-05:00 — #1
Why can't I use /img/img.jpg to access the img folder from the root directory? I can link to css and js like so, or put a href to /index.php and it directs to the root index. But using /img/img.jpg just accesses sub directories. I wonder if there's a workaround or .htaccess method?
ralphm — 2012-12-10T22:07:12-05:00 — #2
No, that should work just fine, and it's the best way to link to images, IMHO. Are you doing this online or on your computer? Are you sure there's a folder called /img/ in your root folder?
ronpat — 2012-12-11T00:19:11-05:00 — #3
Any chance there is a space in the path/filename?
dresden_phoenix — 2012-12-11T00:43:56-05:00 — #4
or perhaps, its because that code is in your styleSheet.css file, which is in a sub folder ? If that's the case, your relative path is off and you need to go up a directory ../images/img.jpg
ralphm — 2012-12-11T00:46:23-05:00 — #5
The OP is using a root-relative path, so it shouldn't matter.