PDA

View Full Version : domain change - effect on links and directory.


sskoutas
Dec-12-2009, 07:51 PM
I am in the process of changing my smugmug from custom URL "halfpintprints.com" to "stephenskoutas.com" Does the directory and link structure stay the same? In other words, if a photo is currently here:
http://www.halfpintprints.com/Nature/Wildlife/2263343_Vu5CF#119549789_4LJvP-A-LB
will it be here after I change the URL:
http://www.stephenskoutas.com/Nature/Wildlife/2263343_Vu5CF#119549789_4LJvP-A-LB

And on a related note, can I just "find and replace" all occurrences of "halfpintprints.com" and replace with "stephenskoutas.com" in my advanced site-wide customization?

jfriend
Dec-12-2009, 09:59 PM
Yes, the structure below the domain stays the same when you change a domain name. For links within your pages, you can just remove the domain entirely and then the links will work before and after without change.

For example a link to this page:

http://www.halfpintprints.com/Nature/Wildlife/2263343_Vu5CF#119549789_4LJvP-A-LB

can be put into an href like this without the domain and with a leading slash:

<a href="/Nature/Wildlife/2263343_Vu5CF#119549789_4LJvP-A-LB">Click here</a>

When the browser parses that link tag, it will automatically attach the domain name of the page that contains the link. If you do it this way now, then the links will continue to work even after you change your domain.

Of course, all the Smugmug-supplied links will just change automatically - you only need to do this for links you put in your own pages (like in navbars or headers/footers or other custom HTML).

sskoutas
Dec-13-2009, 04:28 AM
Excellent, John... thank you.