Jump to content

Shorten Source Directory


Hazukiy
Go to solution Solved by trq,

Recommended Posts

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
Share on other sites

  • Solution

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.