views:

55

answers:

3

I was asked to resolve an issue with shtml file and the problem is like this:

A person was asked to edit an shtml file to add a new radio button. She downloaded the file, added some content and uploaded it to the web server. To my utter shock, the img src="images/Front_Page_22.jpg is now pointing to file:///C|\path1\path2\images\Front_Page_22.jpg

(please note the Pipe after C- )

Additional Info: The page that was downloaded contained relative paths., everything was img src="images/Front_Page_22.jpg img src=../xyz/images/SomeFile.jpg or

My Understanding was she did the right thing by not touching the image tags, as they would be resolved at the server and will point to the directories on the server..

I am at loss to understand how those relative paths got converted to local paths!

Additional Info available to me: Person1 Made the changes on her local system, and after the changes are made, tells the web-master to upload the file

The web-master uploads the file to a Unix server ( the university's web server is on a unix box ) - I don't know whether she uses dreamweaver or sftp to upload the files - I don't think that should be a problem

Thanks

A: 

It was most likely your HTML editor that changed the src attribute.. Check your preferences, there should be an option to disable it.

Quick fix --

Find: file:///C|\path1\path2\images\

Replace with: images/

jnpcl
The issue is that I don't have access to the web server. I can only make changes on a shared drive, and they will be uploaded by the web-master. I am aware that I can change all relative paths (images/a.jpg ) to absolute paths (http://www.example.com/images/a.jpg ).. but I want to know the issue before I do that..
I think you are right - I checked the source code and saw that every reference was changed. Dreamweaver!!
A: 

You downloaded the file using save as... Don't! Right click > View Source > Ctrl + A > Ctrl + C and Ctrl + V in the editor of choice. Or do it the normal way, FTP.

Claudiu
A: 

Since you do not have access to the server, your best bet would be to use wget. It will download the page and all the other images/css/js files it depends on. Here is a basic tutorial explaining how to use it.

Kshitij Parajuli