Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

SEO Tycoon


You are currently viewing our SEO Tycoon as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Making Absolute links tricky
Old 04-07-2007, 11:23 PM Making Absolute links tricky
Average Talker

Posts: 22
Name: pepe
Trades: 0
Hello,
I want to work with absolute links but in a flexible way.

I am using ASP. What I have done is to declare a variable 'SiteRoot' and configure links like this:
<img src="<%=SiteRoot%>/images/picture.jpg">

Well, the main reason for doing this is for being able to adapt quickly in case of needing to change to another domain. I don't know if it is the best option but is the one that I have come across (this is my 1st web design so don't quick me!!). You are very welcome to coment this if you like.

My concern is if this is going to 'punish' my SE ranking in any way. Could you give me some thought of how my rankings would be affected acting this way?

Many thanks.
jmz2 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-08-2007, 01:58 AM Re: Making Absolute links tricky
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
A web site tends to be more portable if you use relative paths ( src="../Images" ). Browsers and spiders convert those into absolute URLs when reading the page.

Also, Google doesn't care how you code or generate your pages. They only want good content.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 04-08-2007, 02:35 AM Re: Making Absolute links tricky
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
You're not the only one who does it that way, jmz2. I actually use two variables: Image_Root (for images) and Page_Root (for pages). I dot his because I have a production server that I use to develop the sites and then a live one to upload them to. I've been doing it this way for a few years now, and I think most people around here will say I know what I'm doing.

Google actually prefers them, or so they say. Personally, I prefer them because I find that it's a lot easier to trace back a failure when an image or page doesn't load...you're staring at the absolute path in the code, so it makes debugging much easier.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 04-09-2007, 12:38 AM Re: Making Absolute links tricky
Average Talker

Posts: 22
Name: pepe
Trades: 0
But now I am stuck with the includes.
I can not make:

<!--#include file="<%=root%>/header.asp"-->

How can I walk around this problem?

Adam as you do this as well, what do you do whith the includes to avoid this? Please.

P.S. The real includes files (settings and such) won't give me this problem as I am thinking on making them all 'include virtual'. My problem is with files like 'headers' and such.

-----Just realised that the solution is to make everything virtual. Need some sleep. Sorry.


Many thanks.

Last edited by jmz2; 04-09-2007 at 12:49 AM.. Reason: Just realised.....was it obvious?!
jmz2 is offline
Reply With Quote
View Public Profile
 
Old 04-09-2007, 06:28 AM Re: Making Absolute links tricky
Junior Talker

Latest Blog Post:
SEO and a Site Face-lift
Posts: 2
Name: victor andrews
Trades: 0
Having absolute or relative paths have no bearings on your SE rankings. But if you plan to change the domain name in future, do not forget to do a 301 to all new urls.
__________________

Please login or register to view this content. Registration is FREE
vickysoft is offline
Reply With Quote
View Public Profile Visit vickysoft's homepage!
 
Old 04-09-2007, 10:19 AM Re: Making Absolute links tricky
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
On my site, I just use a custom tag to include images.
That way, if I need to change image servers or move directories, I can just change the configuration of the tag.
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 04-09-2007, 11:26 AM Re: Making Absolute links tricky
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
You can use include file, but not with a variable.

<!--#include file = "Includefiles/layout.asp"-->

Or <!--#include file = "../../Includefiles/layout.asp"-->

will both work.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 04-10-2007, 02:52 PM Re: Making Absolute links tricky
Average Talker

Posts: 22
Name: pepe
Trades: 0
I use:
<!--#include virtual="/myvirtualdirectory/anyincludefile.asp"-->

I put that virtual directory out of the public root, I supose this would give me a little bit extra security, am I right?

willcode4beer can you give an exmple?


Thanks.
jmz2 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Making Absolute links tricky
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28704 seconds with 12 queries