views:

21

answers:

2

Hello,

I read that for many reasons its better you use full link paths between pages in my site. The question is how can i debug and work on my local testing environment when all of the links are with full path?

(Manually replacing them is not an option...)

Thanks

+1  A: 

Use an customizable prefix, change it for your test environment.

I don't know ASP.net, so this would be it in, say... JSP:

---- something.jsp --------
...
<%! public static final PREFIX = "http://pohlidame.cz/"; %>
...
<a href="<%= PREFIX %>onas">Insolvenční rejstřík</a>
...
---------------------------

This is quite simplistic example. In component oriented frameworks, you create the links' href value somewhere in the controller tier. That might be the case of ASP.net.

But generally, it's a simple concatenation of the prefix plus your desired "relative" location.

Ondra Žižka
can you please explain, give a short example?
beytz
Done, see above.
Ondra Žižka
A: 

Using absolute links has no impact on SEO, but is helpful in instances of site-scraping, site duplication (http/https, for example) etc.

Have you considered using relative URLs along with the base tag? You could then dynamically insert the current domain into the target, giving you the benefit of absolute tags along with the ease-of-use of using relative tags (on debug, staging and live sites).

Raithlin