PDA

View Full Version : Quick Website Hosting Question



newt_101
Aug 23rd, 2006, 07:22 AM
I know this maybe a very easy answer to some people, but I have no idea what to do.

I have a personal site which I need to switch hosting companies (The domain name is registered elsewhere and my hosting company is forwarded to it).

How do I go about updating all the links for my site to work once I switch hosting companies? For example, if a photo link is set to www.yahoo.com/photo.jpg how would I go about changing the programming in the files to www.goggle.com/photo.jpg

I know there must be a simple way to do it, without going through each link one-by-one.

I use Dreamweaver currently.

Thanks greatly,
Marco

sickcars
Aug 23rd, 2006, 09:14 AM
I know this maybe a very easy answer to some people, but I have no idea what to do.

I have a personal site which I need to switch hosting companies (The domain name is registered elsewhere and my hosting company is forwarded to it).

How do I go about updating all the links for my site to work once I switch hosting companies? For example, if a photo link is set to www.yahoo.com/photo.jpg how would I go about changing the programming in the files to www.goggle.com/photo.jpg

I know there must be a simple way to do it, without going through each link one-by-one.

I use Dreamweaver currently.

Thanks greatly,
Marco

it depends on how you made the site. If you made the site like this.....For exaple you have a picture and u have a link on the picture that goes to a bigger sized one. To do it properly the link should be something like this.... largepics/pic1.jpg BUT if you did it like this, http://www.mysite.com/Largepics/pic1.jpg Then you will have to go in and change Everything because it will always look at that URL instead of jut looking in the folder.

Hope you understand.

Ciao

newt_101
Aug 23rd, 2006, 10:19 AM
it depends on how you made the site. If you made the site like this.....For exaple you have a picture and u have a link on the picture that goes to a bigger sized one. To do it properly the link should be something like this.... largepics/pic1.jpg BUT if you did it like this, http://www.mysite.com/Largepics/pic1.jpg Then you will have to go in and change Everything because it will always look at that URL instead of jut looking in the folder.

Hope you understand.

Ciao

Thanks for the reply, but that sounds silly.
Companies change their hosting companies all the time...
Are you saying that whenever they do they go through the elaborate length of changing each and every individual link?

:S

temporalillusion
Aug 23rd, 2006, 11:26 AM
I think what he's saying is that the images should be referenced relative to the document rather than an absolute path. That way you can move it wherever you want without changing anything.

Are these just straight HTML pages?

If so, how are the images referenced? If it's [img src="http://whatever/images/img.gif"] then yeah you have to change them all. If it's [img src="images/img.gif"] then you don't have to do anything; the image is being referenced relative to the HTML document (assuming of course that the images are being hosted in the same location as the HTML document).

If it's the first one, I would recommend changing them all so they're like the second one, to prevent this in the future.

Either way, just use Dreamweaver's search and replace function to do the work.

If it's some sort of photo gallery software then moving it and changing the software setting for the domain it is on should be enough.

WalnutCrunch
Aug 23rd, 2006, 11:32 AM
Tutorial on relative linking...

http://www.brown.edu/webmaster/webpublishing/urls.html

sickcars
Aug 23rd, 2006, 11:46 AM
I think what he's saying is that the images should be referenced relative to the document rather than an absolute path. That way you can move it wherever you want without changing anything.

Are these just straight HTML pages?

If so, how are the images referenced? If it's [img src="http://whatever/images/img.gif"] then yeah you have to change them all. If it's [img src="images/img.gif"] then you don't have to do anything; the image is being referenced relative to the HTML document (assuming of course that the images are being hosted in the same location as the HTML document).

If it's the first one, I would recommend changing them all so they're like the second one, to prevent this in the future.

Either way, just use Dreamweaver's search and replace function to do the work.

If it's some sort of photo gallery software then moving it and changing the software setting for the domain it is on should be enough.

Thats exactly what I was trying to say :) lolol

Thanks

baz5
Aug 23rd, 2006, 01:20 PM
I know this maybe a very easy answer to some people, but I have no idea what to do.

I have a personal site which I need to switch hosting companies (The domain name is registered elsewhere and my hosting company is forwarded to it).

How do I go about updating all the links for my site to work once I switch hosting companies? For example, if a photo link is set to www.yahoo.com/photo.jpg how would I go about changing the programming in the files to www.goggle.com/photo.jpg

I know there must be a simple way to do it, without going through each link one-by-one.

I use Dreamweaver currently.

Thanks greatly,
Marco


I think you are confusing yourself.
You should't have to change any links in your webpages, unless the actual images changed location, ie photobucket to imageshack.
Your new hosting company will have the files, and the domain will point it to it's location.

And like the above said, if you are changing your DOMAIN name and your links had the old domain in the code, you would have to physically change every link.
Dreamweaver there, you can do a 'search' and 'replace all', so you'd enter your old domain and change it with your new domain. Wouldn't take long at all, unless you had hundreds of pages.

Firestorm ZERO
Aug 23rd, 2006, 01:33 PM
Tutorial on relative linking...

http://www.brown.edu/webmaster/webpublishing/urls.html

2nd this. You should of used relative linking instead of absolute links. Absolute links are meant for linking to off-site pages not for within your own.

If you have absolute links then you have use a search+replace off notepad or whatever html program you use for EVERY page you did. Tough luck but you made it that way. And while you do that you might as well change them to relative.

newt_101
Aug 23rd, 2006, 01:34 PM
Perfect.

Thanks a lot everyone.
I have all the understanding on this now.

I was confused.

www.MarcoArash.com

That is my website; it's my first attempt at web programming.
The photos are not the issue, it's more the links throughout the programming, pointing to other parts on the site.

Much appreciated once more.
Marco