Hazukiy Posted June 19, 2013 Share Posted June 19, 2013 Hi, I have a question that's bugging me really badly, I want to make it so that when I have a <img> tag, the source of that image is shortened to look something like this... <img src="../../image.jpg" alt="picture_1" /> But when I do this, it doesn't work. I've tried many methods and different combination but it doesn't seem to work, so I figured that It must be some kind of option in the apache .htaccess file? Help would be much appreciated, thanks. Link to comment https://forums.phpfreaks.com/topic/279344-shorten-source-directory/ Share on other sites More sharing options...
trq Posted June 19, 2013 Share Posted June 19, 2013 Do you understand what the ../../ does? Link to comment https://forums.phpfreaks.com/topic/279344-shorten-source-directory/#findComment-1436816 Share on other sites More sharing options...
Hazukiy Posted June 19, 2013 Author Share Posted June 19, 2013 On 6/19/2013 at 12:04 PM, trq said: Do you understand what the ../../ does? Skips some of the directorys doesn't it? I learnt it a while back but completely forgot about it. Link to comment https://forums.phpfreaks.com/topic/279344-shorten-source-directory/#findComment-1436826 Share on other sites More sharing options...
trq Posted June 19, 2013 Share Posted June 19, 2013 Skips? It ../ goes back up the directory tree one directory from where it is called. ../../ goes back up 2 etc etc So, all this (../../image.jpg) says is go back up two directories (relative to the current url) and find the file image.jpg If you have used any kind of computer from a terminal this type of thing becomes second nature. If you haven't (and your a programmer) do so. Link to comment https://forums.phpfreaks.com/topic/279344-shorten-source-directory/#findComment-1436835 Share on other sites More sharing options...
Hazukiy Posted June 19, 2013 Author Share Posted June 19, 2013 On 6/19/2013 at 12:58 PM, trq said: Skips? It ../ goes back up the directory tree one directory from where it is called. ../../ goes back up 2 etc etc So, all this (../../image.jpg) says is go back up two directories (relative to the current url) and find the file image.jpg If you have used any kind of computer from a terminal this type of thing becomes second nature. If you haven't (and your a programmer) do so. Ah ok thanks. Link to comment https://forums.phpfreaks.com/topic/279344-shorten-source-directory/#findComment-1436837 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.