2008-08-26, 04:30 PM
Well,
I had transferred severs lately and changed the domain. I wanted to ask a simple question which got me mixed in a way or another. Now I had a newsbar in the old server (and domain) which had links to specific threads in the forum. When I was doing the template edits, I wrote the link in the following format:
When I transferred the server, this link, as you may have already guessed is not active anymore so I had to manually edit the templates again to be like:
Rather than using this long url to link to the post from the begginng, I could have used this in the template edits: (Please correct me if I am wrong)
I could easily use this way because the showthread.php is in the same directory in which the link is inserted (i.e: the link is at index.php, index.php and showthread.php are both in the same directory)
So finally, my question is: (sorry for all that delay)
What if the place where I linked from wasn't index.php?
For example, imagine, just imagine that I were to link from the uploads directory, it'll search for showthread.php and won't find it within the uploads directory and so the link is broken so what form of link should I use which would not be affected by domain changes?
Thanks a lot and really sorry for the long explanation.
I had transferred severs lately and changed the domain. I wanted to ask a simple question which got me mixed in a way or another. Now I had a newsbar in the old server (and domain) which had links to specific threads in the forum. When I was doing the template edits, I wrote the link in the following format:
<a href="http://www.mydomain.com/forums/showthread.php?tid=23">Click here</a>
When I transferred the server, this link, as you may have already guessed is not active anymore so I had to manually edit the templates again to be like:
<a href="http://www.mynewdomain.com/forums/showthread.php?tid=23">Click here</a>
Rather than using this long url to link to the post from the begginng, I could have used this in the template edits: (Please correct me if I am wrong)
<a href="showthread.php?tid=23">Click here</a>
I could easily use this way because the showthread.php is in the same directory in which the link is inserted (i.e: the link is at index.php, index.php and showthread.php are both in the same directory)
So finally, my question is: (sorry for all that delay)
What if the place where I linked from wasn't index.php?
For example, imagine, just imagine that I were to link from the uploads directory, it'll search for showthread.php and won't find it within the uploads directory and so the link is broken so what form of link should I use which would not be affected by domain changes?
Thanks a lot and really sorry for the long explanation.