The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Changing Hyperlinks On Mirrored Site?
JackWind
post Jan 24 2023, 11:06 AM
Post #1





Group: Members
Posts: 2
Joined: 24-January 23
Member No.: 28,768



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
Attached Image
Original Source Code
Attached Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jan 24 2023, 12:08 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,286
Joined: 10-August 06
Member No.: 7



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
JackWind
post Jan 24 2023, 12:18 PM
Post #3





Group: Members
Posts: 2
Joined: 24-January 23
Member No.: 28,768



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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jan 24 2023, 06:48 PM
Post #4


.
********

Group: WDG Moderators
Posts: 9,286
Joined: 10-August 06
Member No.: 7



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.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th January 2023 - 05:25 PM