I'm working on a site with more than 1700 HTML files. We'll be moving files
around on this site a lot because we're reorganizing it. I'm thinking of writing
a script that will convert all URLs in href and src attributes to absolute URLs
with this form:
href="/somedir/somefile.htm"
src="/images/somecategory/image.gif"
That way, if you move a page from one directory to another, the links and image
references within the page will not break. Also, if you move the entire site to
a different host, all the links will still work.
Is there anything wrong with this plan? Some people advocate relative URLs...
href="../../somefile.htm"
....but if you move a page containing such a link, the link will be broken.
Aren't absolute URLs better?
I've noticed that Dreamweaver's system for checking and updating internal URLs
is based on relative URLs. Does that indicate that relative URLs are better for
some reason?
Thanks,
dm