/    Sign up×
Community /Pin to ProfileBookmark

In cgi you can refer to a page by an absolute address (ex: /home/user/www/), so that you can always start at the top when addressing a file. Is there something similar for html? I hate starting everything off with [url]http://www[/url]. etc.

thanks,

mike

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@kelly23Jul 13.2006 — Yes, use "/" which starts at the root. for example:

<a href="/folder2/file5.html">

. . . is the same as http://yourdomain.com/folder2/file5.html

Or you can use relative url's. If a file is in the same directory as the one you're linking from you can use:

<a href="filename.html">

kelly
Copy linkTweet thisAlerts:
@wpahikerauthorJul 13.2006 — Thanks. That will save a lot of headaches.
×

Success!

Help @wpahiker spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...