So, does anyone here know HTML coding...?


Off-Topic Discussions


*Coughs* Little bit awkward, but... I'm trying to set something up, and I need to figure out how to configure an HTML template to replace all instances of one URL link on a site to a different link when a page is generated. (Since they're not 'fixed' pages, I can't just edit a static version of it and be done.)

Is there anyone here who might be able to help me figure this out?


Hi Rednal, what type of templating are you using? Could you paste some code here to show us an example of what you're trying to do?

Dark Archive

There's liekly not one simple answer -- it'll depend on what you're using for templating, and most importantly how the pages are being dynamically generated.

Are you using a CMS? If so then exactly how it's done will vary from one CMS to another, and some will have optional modules that provide different ways to dynamically generate pages.

Alternatively, depending on exactly what you're after, one simple option might be the <base> tag -- if the directory structure & names of all the pages & content on the website are the same below a certain level, and it's only the domain and maybe part of the directory path that is changing between the original links and the new ones after the pages are generated, then changing the URL specified in the <base> tag will change where all of the relative URLs in the rest of the page resolve to.


I'm not sure I'm allowed to share the code in public, precisely... but to dive in and look around, you could register as a partner on the platform I'm using and get to it that way. (It is free, although you might want to use a throwaway email if you don't want to keep it - please accept my apologies for the roundabout method of sharing the code, since I'm pretty sure I'm not actually allowed to do it any other way. User Agreements can be inconvenient at times.)

My problem is that this platform doesn't (yet) have good category navigation. I'm 95% of the way through faking the navigation well enough for it to work for what I'm trying to do, but I need to be able to redirect certain URLs so people actually go to the right place when they click particular links.

Community / Forums / Gamer Life / Off-Topic Discussions / So, does anyone here know HTML coding...? All Messageboards

Want to post a reply? Sign in.