Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link address gets changed when saving a web page 1

Status
Not open for further replies.

RexxSysProg

Programmer
Jul 2, 2004
205
US
I have web pages that have links in them in the form: href="/intro.html" These pages get FTPed to a directory that finds the pages with this type of address.

But when I edit (via notepad) the web pages to make unrelated changes, when I save it and exit and then close the page Windows changes the addresses to be href="///C:intro.html"

This happens almost every time. The same thing often happens with gifs. I have them pointing to "images/intro01.gif" . But when I save the page Windows changes it to "intro_files/intro01.gif" . So when I upload these pages they don't work.

This always happens when I save the file with a new name and almost always when I re-save it with the same name.

How do I stop Windows (notepad?) or whatever is changing these addresses from doing this? I am wasting so much time having to change everything back over and over again each time I make a change that I want to upload.

Thank you.
 
Notepad is just a notepad. It is not an html editor and as such has no inclination to change any of the link references -- since it doesn't recognize the href="" as anything but just some meaningless text. So, if you open a file with notepad, save it, close it, re-open it, make changes, save it again, there will be no changes to your link references. If you however open the file in Explorer or similar and then use 'save this page' option Explorer will attempt to make your experience the best possible and will save the images on the local drive and change the image references.

So, to avoid what you are experiencing, simply stop saving the page in Explorer. If you need to change something, simply re-open the same file you just uploaded in Notepad and you're ready for work.
 
Thank you for your help, Vragabond. That took care of it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top