Solved

Possible to use Site Root & Document Relative links on the same web page

Posted on 2010-08-31
9
391 Views
Last Modified: 2012-06-27
Hello Experts,

I build a large web application last year, using Document relative Links. Now because we are implementing SEO friendly pages in one of the directories, I need to change the links from Document relative to Site Root Relative, in order to implement the SEO friendly pages.

This is taking ages..

The other directories don't need to be changed, however there are some scripts "<!--#include virtual="/scripts/script.asp" -->"

Which are included in all documents (web pages) these still have Document relative links.

My question, is will having both document & site root relative links in any one document have a detrimental effect?

Thank you
0
Comment
Question by:garethtnash
  • 5
  • 2
9 Comments
 
LVL 18

Accepted Solution

by:
mgfranz earned 500 total points
ID: 33568448
No, there is no detrimental effect on using either document, site-root or absolute paths in the documents.  Thinking about it, SEO might want to use absolute paths over relative or site root.

Nice reading:
http://kb2.adobe.com/cps/131/tn_13129.html
http://www.searchenginejournal.com/seo-internal-interlinking-relative-vs-absolute-urls/7000/
http://www.bing.com/community/blogs/webmaster/archive/2009/07/01/making-links-work-for-you-sem-101.aspx

As for doing the path replace, why not just use the Replace feature in your editor?  It probably has a switch that can be set to peruse through the entire web site.  Or you can write your own little RegEx that can do the match based on patterns.
0
 
LVL 16

Expert Comment

by:golfDoctor
ID: 33568842
Include paths like <!--#include virtual="/scripts/script.asp" --> have no effect on SEO, and there is not need to change them, if referenced from the root, as above.
0
 

Author Comment

by:garethtnash
ID: 33572047
Sorry guys what I mean is, if I have a web page, with most of the links site root relative like -
<a href="/default.asp ">Home</a>
Will it cause any issues if there are one or two links that are not site root relative, for instance -
<a href="../default2.asp ">Other Link</a>
Thank you
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 33572106
You should convert them to absolute paths just to be sure.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 16

Expert Comment

by:golfDoctor
ID: 33572530
I would suggest never doing this ../, <a href="../default2.asp ">Other Link</a> , as it limits scalability and changes.

And for SEO purposes, the full path is better.

You could do something like this:

declare a global variable like session("root") = "http://www.mysie.com", and then use that in building links.<a href="<%=session("root") %>/default2.asp ">Other Link</a>.  That way, if the root changes, like it has for you now, you only need to change the session variable (can set in global.asa, or include file.
0
 
LVL 16

Expert Comment

by:golfDoctor
ID: 33572538
Also, download Windows Grep.  This is a great tool for finding and replacing patterns in code, in bulk updates.  http://www.wingrep.com/
0
 
LVL 16

Expert Comment

by:golfDoctor
ID: 33769031
split
0
 
LVL 16

Expert Comment

by:golfDoctor
ID: 33807008
Why was the suggestion to split points ignored?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now