Forum Moderators: phranque

Message Too Old, No Replies

Relative or absolute path?

         

Cosmin

6:48 pm on Oct 26, 2003 (gmt 0)

10+ Year Member



Hi,

Is there any inconvenience if I design the layout of my site with absolute path instead of relative path for everything like: images, links, web bot, css, backgrounds etc...

I am wondering if search engines penalize this or if there is any other problem I didn't think about.

lorax

6:56 pm on Oct 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Re: penalize for absolute URLs.

Quite the opposite I feel. And in fact, it will make the job of someone who steals your website much harder to convert the pages over to fit their particular webspace.

Nick_W

6:56 pm on Oct 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why not use a root relative path?

Every link is then relative to the http root like this

<a href="/dir/file.html">blah</a>

<link rel="stylesheet" type="text/css" href="/styles/css.css" />

<img src="/images/pic.jpg" alt="" />

One of the main advantages is that it's easy to maintain.

Nick

incywincy

8:05 pm on Oct 26, 2003 (gmt 0)

10+ Year Member



Consider that you may decide to change host sometime.

Relative references willl make moving a lot less painful.

sun818

8:30 pm on Oct 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There are many discussions on WW about relative vs absolute URLs [google.com]

Imaster

11:11 am on Oct 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have always used root relative paths like Nick mentions above, mainly because that's really useful to maintain.

ncw164x

11:25 am on Oct 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Lorax

If you use IE off line browser to copy a site it changes the url to relative, if you copied the site to your hard drive you can do a find and replace using dreamweaver to change the url to whatever you require

It is a deterrent to try and stop your site from being copied but in reality it does not work

ncw164x

lorax

1:58 pm on Oct 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



ncw164x,
Correct. I did not say it would prevent the theif but rather make it more difficult for them to complete their thievery. ;)