Page 1 of 1

Saving a static webpage properly for downloading files

Posted: Sun Nov 12, 2017 8:34 pm
by bowlesj
Hi, I am not sure if this is an appropriate question but maybe.

I have a simple website I am running on xampp to generate a few mysql database generated web pages. To get these simple web pages up to the web host I am pulling up the page locally on xampp then in windows-7 right clicking on the page and doing the "save as" command to save it as an html file as "webpage complete". Once that is done I use WinSCP to move the html files up to my directory at the web hosting computer. So that works great and avoids my having to set up a VPS as I did with my prior complex database driven website. However I just decided to allow my 27 users of the website to download files. So when I save the webpage it changes the download path which causes a not found error when the download link is clicked. I show what it does in the two examples below including how I have to fix up the html file using notepad++. I am wondering if there is an easier way to save the page as a status html file without having to use notepad++

This is how it saves it (it places the "http://localhost/MJN/" in front).

Code: Select all

<div style="line-height:19px;"><span style="color:#000000;font-family:&#39;Times New Roman&#39;;font-size:15px;"><strong>For an example download of a Band In A Box (BIAB) file <a href="http://localhost/MJN/A_Fine_Romance_RB_HL_V1.MGU" download"="">click here</a>.</strong></span></div>
Here is what I have to change it to using notepad++ search and replace (I have to remove the "http://localhost/MJN/")

Code: Select all

<div style="line-height:19px;"><span style="color:#000000;font-family:&#39;Times New Roman&#39;;font-size:15px;"><strong>For an example download of a Band In A Box (BIAB) file <a href="A_Fine_Romance_RB_HL_V1.MGU" download"="">click here</a>.</strong></span></div>
Thanks,
John

Re: Saving a static webpage properly for downloading files

Posted: Sun Nov 12, 2017 9:21 pm
by Pablo
You can use 'Global Replace' in the tools menu to replace 'http://localhost/MJN/' in all pages.

Re: Saving a static webpage properly for downloading files

Posted: Sun Nov 12, 2017 11:17 pm
by bowlesj
Okay, thank you Pablo.

John