Help - Search - Members - Calendar
Full Version: Changing Hyperlinks On Mirrored Site?
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
JackWind
New to HTML here; previous web development experience only comes from Wordpress. I'm working on building a new website for a client and currently have a downloaded version of his website currently uploaded to a host as a temporary solution to maintaining his web presence. Everything on the site works perfectly, except for hyperlinks in all of the inventory pages such as this one here (https://legacylifttrucks.com/default867f.html?page=xNewInventory) which go to pages that don't exist, and I am asking for help to correct these links to go to the proper pages.

I initially thought this would be as easy as editing hyperlinks to redirect them to the correct page, but upon further inspection there is no such code in the html file, yet when I use Inspect on Chrome, there is additional code that isn't in the source file (shown in images below) in the VehBody heading, which is where each of the listings are. Anyone have any idea where the page is actually pulling this info from? I tried implanting the code from Inspect into the html file and then changing the link, which worked on my computer but on the live website it went back to linking to broken links.

Again, my only experience here is in Wordpress, so any help or insight is greatly appreciated.

Link to Pastebin of Inspect source code (https://pastebin.com/Et8bMyna)

Additional code from Inspect function
Click to view attachment
Original Source Code
Click to view attachment
Christian J
QUOTE(JackWind @ Jan 24 2023, 05:06 PM) *

there is additional code that isn't in the source file (shown in images below) in the VehBody heading, which is where each of the listings are. Anyone have any idea where the page is actually pulling this info from?

I just took a quick glance, but it looks like javascript (in the form of jQuery, Ajax, JSON?) inserts that content, possibly from a database (in turn through an ASP server-side script, it seems). To view server-side script files you need access to the webserver through e.g. FTP, downloading a finished web page will not show any of them.

As for the link URLs, "legacyforklifts.com" is mentioned several times in the javascripts on https://legacylifttrucks.com/default867f.ht...e=xNewInventory so it's possible that one of these are used when the link URLs are constructed, can't say.

The broken link
CODE
https://legacylifttrucks.com/default.asp?page=xNewInventoryDetail&id=12082942&p=1&s=Year&d=D&t=new&fr=xNewInventory
seems to point to a server-side script at https://legacylifttrucks.com/default.asp (which also seems to be missing). The rest of the URL after the "?" character is a querystring used by the ASP script in order to generate the product page.
JackWind
QUOTE(Christian J @ Jan 24 2023, 12:08 PM) *

QUOTE(JackWind @ Jan 24 2023, 05:06 PM) *

there is additional code that isn't in the source file (shown in images below) in the VehBody heading, which is where each of the listings are. Anyone have any idea where the page is actually pulling this info from?

I just took a quick glance, but it looks like javascript (in the form of jQuery, Ajax, JSON?) inserts that content, possibly from a database (in turn through an ASP server-side script, it seems). To view server-side script files you need access to the webserver through e.g. FTP, downloading a finished web page will not show any of them.

As for the link URLs, "legacyforklifts.com" is mentioned several times in the javascripts on https://legacylifttrucks.com/default867f.ht...e=xNewInventory so it's possible that one of these are used when the link URLs are constructed, can't say.

The broken link
CODE
https://legacylifttrucks.com/default.asp?page=xNewInventoryDetail&id=12082942&p=1&s=Year&d=D&t=new&fr=xNewInventory
seems to point to a server-side script at https://legacylifttrucks.com/default.asp (which also seems to be missing). The rest of the URL after the "?" character is a querystring used by the ASP script in order to generate the product page.


Thanks for the reply. Does that mean that removing the javascripts will stop the page from running those serverside scripts? Based on what you're saying the script the broken link points to probably wasn't downloaded when I harvested the website? If so that should mean I should be able to inject the inventory information back into the page like it did in the Inspect section?
Christian J
QUOTE(JackWind @ Jan 24 2023, 06:18 PM) *

Does that mean that removing the javascripts will stop the page from running those serverside scripts?

Maybe, at least the scripts generating the VehBody HTML you found with the Inspector.

The linked missing pages seem to be generated from the URL querystring parameters, not javascript. Once generated, they might contain javascript too, can't say.

QUOTE
Based on what you're saying the script the broken link points to probably wasn't downloaded when I harvested the website?

Yes. Server-side scripts are normally not viewable by ordinary site visitors, only their output. You'd need access to the site's account at their webhost and use e.g. FTP to download the script files.

QUOTE
If so that should mean I should be able to inject the inventory information back into the page like it did in the Inspect section?

You mean make a static website (without server-side scripting or database)? Might work, if the broken links still work at the original domain. You will loose any potential functionality that made the original site choose to use a database in the first place, though.

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.