Click to See Complete Forum and Search --> : help with links/base tag


merlina
07-13-2006, 05:16 PM
Hello, this is my first post,

I know html but I have a problem because I am moving my site. Here's the thing. I have a domain name that is set up to the old server where I am still paying for my site (thejfiles.com). I am in the process of transferring my site to the new server. The thing is because I have so much stuff to transfer, I am doing certain subsites at a time and redirecting those directly to the ip address for the time being until I get the full site transferred (redirected using other domains I own. Some of them that have certain file structures work fine). Okay, now I am on to transfering the big part of my site. Before I change the DNS entry to my new server, I want to make sure that everything works. The problem is that the ip address to my new server with my directory is http://72.9.235.10/~jfiles/
On my site I have many subdirectories, going down fairly deep. HTML files in different folders may link to completely other folders. An example is the page may be in a folder structure such as:

/xxxhomepage/eps1/ice/

I want to link to the images within a different folder:

/xxxhomepage/imgs/eps1/ice/

The thing is that because I was always using my domain before, that is how I would set the link: <a href="/xxxhomepage/imgs/eps1/ice/icefmdsice1.gif">

But, now since I am using the ip, because my website is in the user directory that links to
http://72.9.235.10/xxxhomepage/imgs/eps1/ice/icefmdsice1.gif
rather than
http://72.9.235.10/~jfiles/xxxhomepage/imgs/eps1/ice/icefmdsice1.gif
like it should.

I have so many pages linking to thousands of photos. Until I transfer the DNS it will keep linking wrong. I know I probably should have done the file structure different when I started, but that was years ago and I didn't know it mattered. I know I have a few options. I can relink everything by adding /~jfiles/ in front of everything, but once I change the DNS it won't work anymore. I also don't want to change all of the links on all of my pages. I know I can also change all the links to using .../.../.../ or whatever, but that is confusing with so many directories and would take forever as well.

I realized I could use the <base> tag and then I would only have to add one line to each page and I could just delete that line after changing the DNS. But the problem is, I would still have to change each of the links to get rid of the slash before the directory (ie something that is linked to /xxxhomepage/ would have to be xxxhomepage/ without the slash, which again wouldn't work after the DNS change if I got rid of the base line).

Is there some other way to fix this? I tried using the base without the slash ie
<base href="http://72.9.235.10/~jfiles">
but still the links are not correct unless I get rid of the first slashes.

Is there any other way to fix my site without going through changing every link on each page and then changing them back again? I know that using the base and getting rid of the first slash would still work after I change the dns since it can still link to the ip, but I don't want to continue to link to the ip after since there are problems with bandwidth stealing, etc. plus the server owners won't want me to keep it that way.

I would really appreciate some help or if you could send me in the right direction.

Thanks, Jamie

scullygirl818 @ comcast.net (no spaces)