Changing base href organized site to a relative path site -- needs to be automated

Hi there,

I am trying to test my entire site for broken links. I know that there are validators out there that can go page by page and then there are the paid services that will check your entire sites. However, I use Dreamweaver (which has a validator as part of the program) so I'd rather use that if I could.

Here's the thing, Dreamweaver ignores my base href and tells me that all the links on my site are broken. I can't find any way around this so I am looking to change my site link paths to relative links not based on the base href. Is there a way to make this transition less painful than I think it is going to be? -- There are ~5200 links to update.

I.e., is there a way to automate this process? I was hoping that Dreamweaver would ask "Do you want to update all your links" when I removed the base href, but no.

Are there any other programs out there, maybe even FTP cute, etal)

Cheers in advance,
Who is Participating?
ZylochConnect With a Mentor Commented:

If Dreamweaver ignores base href, I have no idea about how to change it if possible. Below is a site with a methodical way of doing this by hand, and if you find the 4000 links a bit too difficult, you can probably make a macro with something like Macro Express to simplify things.

gooner_paulAuthor Commented:
Thanks for the info, Zyloch. You mentioned a site but left no address -- unless you mean the Macro Express guys.

Ah, I forgot, sorry, my bad.

For Macro Express, it's a utility that you can make easy macros from. With care of use, you should be able to make a macro that can loop through above site's solution.
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

wobbledConnect With a Mentor Commented:
In dreamweaver just use find and replace under the edit menu.

Put in the start of your  href code <a href= and in replace <a href="www.mysite\etc\

You can then choose the option to change this accross entire site

should make it much quicker for you
I'm confused as to why you need the base href in the first place.

Any links within your own site should be relative, and wouldn't require a base href. Any links outside your site should be absolute, and wouldn't require a base href. A base TARGET I could understand.
webwoman - base href is a recommendation.  While it is not really required within modern browsers it can help on some older clients and search spiders.  Check out for mor info.
gooner_paulAuthor Commented:
Sorry that I have been tardy in responding -- it was a late night and I only just stirred an hour ago.

I'll try and respond to all.

(1.) I chose base href so that I didn't have to worry about moving the hierarchy of the site around in the initial construction phase and messing all the directory level "../../" parts of the path up. However, at the time I started this project I didn't have Dreamweaver, so in hindsight I was stupid to go with the base href as every time you change the sites navigation Dreamweaver auto updates all your links for you.

(2.) As for the search and replace idea -- while I think it is a good one -- it could be tricky as I also have a lot of external links as well as local. Also, aren't relative links easier on server time that absolute links. Will I still have the issue of not being able to use the Dreamweaver functionality of auto update?

yours, still slightly confused,
Yes, relative links are faster than absolute ones, but in today's age, it usually doesn't matter.
webwomanConnect With a Mentor Commented:
>>I chose base href so that I didn't have to worry about moving the hierarchy of the site around in the initial construction phase and messing all the directory level "../../" parts of the path up.

If you use a root reference  -- /folder1/folder2/file.html -- it doesn't matter where the files are, they take the path from the defined root of the web.

Search and replace would work fine -- you would be looking for a href="xxx/something.html" and NOT a href="http://... " which would be needed for external links.
gooner_paulAuthor Commented:
Thanks guys. Looks like I have a lot to go on. All good stuff.
All Courses

From novice to tech pro — start learning today.