I am currently working on a basic site using PHP includes that I am testing locally using MAMP. I am not using dreamweaver so I don't have the luxury of auto updating links when I transfer to a server.
The problem is I work on the site locally and it works fine. But when I upload it to www.mydomain.com/_clients/_folder_name_ all of my links break because I am using links such as href="/img/image-name.jpg".
How would I prevent the link from going to my domains server root and just stay inside the folder. Is this something an .htaccess file would do? If so could someone explain how that works?
Hey TheDoc. Thanks for the reply. Unfortunately that is exactly the problem the folder structure is different. Let me add more detail.
Point A. I am a freelancer and create multiple sites so I need a folder on my website to place multiple jobs so for example.
Point B. domain root/_clients/job1 domain root/_clients/job2 domain root/_clients/job3
I send the client the link above to review the design. But the problem arises when I have links like. /img/image.jpg because it travels all the way to the domian root folder. What I need is a way to say hey stop here at job1 and get the img folder.
Point C: and then when the client approves the design I need to take the approved job and put it to their server.
So point A and point C are the same. But when I load it to my client folder on my site the links break.
The problem is I work on the site locally and it works fine. But when I upload it to www.mydomain.com/_clients/_folder_name_ all of my links break because I am using links such as href="/img/image-name.jpg".
How would I prevent the link from going to my domains server root and just stay inside the folder. Is this something an .htaccess file would do? If so could someone explain how that works?
Much appreciated!
Point A.
I am a freelancer and create multiple sites so I need a folder on my website to place multiple jobs so for example.
Point B.
domain root/_clients/job1
domain root/_clients/job2
domain root/_clients/job3
I send the client the link above to review the design. But the problem arises when I have links like. /img/image.jpg because it travels all the way to the domian root folder. What I need is a way to say hey stop here at job1 and get the img folder.
Point C:
and then when the client approves the design I need to take the approved job and put it to their server.
So point A and point C are the same. But when I load it to my client folder on my site the links break.
Thank you for helping.