• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

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

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
garethtnash
Asked:
garethtnash
  • 5
  • 2
1 Solution
 
mgfranzCommented:
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
 
golfDoctorCommented:
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
 
garethtnashAuthor Commented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
mgfranzCommented:
You should convert them to absolute paths just to be sure.
0
 
golfDoctorCommented:
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
 
golfDoctorCommented:
Also, download Windows Grep.  This is a great tool for finding and replacing patterns in code, in bulk updates.  http://www.wingrep.com/
0
 
golfDoctorCommented:
split
0
 
golfDoctorCommented:
Why was the suggestion to split points ignored?
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now