How do I write URLs for use on a CD?

liunx

Guest
I would like to put my website on a CD and would like to know how to place the URLs in an "A HREF" tag without using a drive letter (since CD drives use different letters depending on configuration). I've tried using file:///filepath (I didn't substitute anything for the drive letter in the filepath - don't know what to substitute) and it doesn't work. I'm using WindowsXP; if the method is different for different versions of windows, please let me know.<br />
<br />
Thanks!<br />
<br />
Chris<!--content-->if the whole site's going to be on the cd then just use links like: <br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"page1.html">page 1</a><br />
<br />
and for higher directeries<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"../page1.html">page 1</a><!--content-->Thanks, but I knew to use the short links on equivalent directories and how to shorten them for directories deeper than the one the link is in. What I need to know is how to structure the link for directories above the one the link is in, for instance:<br />
<br />
<!-- m --><a class="postlink" href="http://www.kingdomspress.com">http://www.kingdomspress.com</a><!-- m --><br />
<br />
is my website. It has in it a page called:<br />
<br />
<!-- m --><a class="postlink" href="http://www.kingdomspress.com/10k/b/index.html">http://www.kingdomspress.com/10k/b/index.html</a><!-- m --><br />
<br />
If I am on that page and I want to go to the page at:<br />
<br />
<!-- m --><a class="postlink" href="http://www.kingdomspress.com/10k/index.html">http://www.kingdomspress.com/10k/index.html</a><!-- m --><br />
<br />
I need to know how to do that on CD without using a drive letter.<br />
<br />
Thanks!<br />
<br />
Chris<!--content-->on <!-- m --><a class="postlink" href="http://www.kingdomspress.com/10k/b/index.html">http://www.kingdomspress.com/10k/b/index.html</a><!-- m --><br />
to get to <!-- m --><a class="postlink" href="http://www.kingdomspress.com/10k/index.html">http://www.kingdomspress.com/10k/index.html</a><!-- m --><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"../index.html">link</a><br />
<br />
to get to <!-- m --><a class="postlink" href="http://www.kingdomspress.com/index.html">http://www.kingdomspress.com/index.html</a><!-- m --><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"../../index.html">link</a><!--content-->Using relative links as incawarrior says is the best way because some peoples cdrom drive letters are different - i.e. if they have more hard drives.<!--content-->Okay, sorry, let me make sure I understand...<br />
<br />
The two dots and slash ../ take you up one level? Sorry I've always read a couple of dots as meaning "put whatever in this spot."<br />
<br />
Thanks a bunch!<br />
<br />
Chris<!--content-->There are two directory entries that are often hidden in file system lists.<br />
<br />
. is the current directory<br />
.. is the parent directory<br />
<br />
cd .. will take you up on directory level (unless you're in the root 8-)<!--content-->Thank you to everyone who replied! Unfortunately, I still have another question about the relative links, or how to otherwise do the below links for use on a stand-alone CD:<br />
<br />
If I am on the page<br />
<!-- m --><a class="postlink" href="http://www.kingdomspress.com/10k/b/index.html">http://www.kingdomspress.com/10k/b/index.html</a><!-- m --><br />
<br />
and I have a link to a page at<br />
<!-- m --><a class="postlink" href="http://www.kingdomspress.com/10k/p/index.html">http://www.kingdomspress.com/10k/p/index.html</a><!-- m --><br />
<br />
how would I do that? I would need to back up a level and then go down another tree. <br />
<br />
If there is no relative way to do this, I think there should be some absolute way to code it - a couple of years ago I worked somewhere where someone knew how to do this (and did), but I don't remember how it was done now.<br />
<br />
Thanks again!<br />
<br />
Chris<!--content-->If I am on the page<br />
<!-- m --><a class="postlink" href="http://www.kingdomspress.com/10k/b/index.html">http://www.kingdomspress.com/10k/b/index.html</a><!-- m --><br />
<br />
and I have a link to a page at<br />
<!-- m --><a class="postlink" href="http://www.kingdomspress.com/10k/p/index.html">http://www.kingdomspress.com/10k/p/index.html</a><!-- m --><br />
<br />
how would I do that? I would need to back up a level and then go down another tree.<br />
<br />
<br />
"../p/index.html"<br />
<br />
You're in b. "../" says 'up a level' so now you're in 10k. Now "p/" takes you down into p to retrieve index.html.<!--content-->I don't know if it will be useful (and it probably won't in the least), but if you want to try to avoid too much relative linking, you can use '/' as the root of the drive.<br />
<br />
E.g., "/10k/p/index.html" would take you to the index file under 'p' no matter where you are.<br />
<br />
(And you probably didn't need to know that; sorry if I'm interfering!)<!--content-->Wow 2 users called<br />
<br />
pneumaticat<br />
patenaudemat<br />
<br />
i thought it was the same person! Anyway; relating back to the topic, what patenaudemat says is correct and takes you back to the root directory.<!--content-->The problem with rooting it with "/xxx/yy" is that the resulting "file/web" site HAS to be copied to a root directory. Using purely relative links allows the result to be grouped with others under some organizational structure at the discretion of the user.<!--content-->Hi -<br />
(Pre-S. - Sorry for the length & possible utter simplicity of this tip!!)<br />
Try organizing your files as such:<br />
<br />
1. one main DIR/folder on your desktop - wherever is superhandy, titled: " ___ site".<br />
This is where you put *everything* to do with the site; it's contents are what will be burned onto the CD.<br />
location = siteROOT/<br />
<br />
2. if your site is *huge*, make a dir within the above for each "logical section" of it. <br />
[i.e. "forum"]<br />
location = siteROOT/forum<br />
its pages are now referred to as -<br />
= siteROOT/forum/pg1.html<br />
<br />
BUT, be sure to leave index.html, default.html (whatever) ON ITS OWN within the "___ site"ROOT/.<br />
<br />
3. if loads of images per DIR - give several images folders suffixes_names for the matching section of the site. [2.] But don't put them in those separate folders!!<br />
Leave all the images___ DIRs in the MAIN ___site DIR!<br />
location = siteROOT/images_forum/imagename.ext<br />
& referred to in the html docs as -<br />
="/images_forum/imagename.ext"<br />
[a *relative* path, with the siteROOT NOT explicitly stated - which solves the drive letter: issue]<br />
<br />
4. be sure to add any external .css sheets into the same DIR as the siteROOT/section that they match. [2.] That way, you're linking from your page to a file in the same location.<br />
href=http://www.webdeveloper.com/forum/archive/index.php/"filename.css" /><br />
<br />
5. change the current links in your pages with a text editor's 'replace all' to go with the new structure:<br />
- - - - - - -<br />
a] Since all of the site is now contained in a main DIR: "___ site" - or siteROOT - just burn the contents of that folder *NOT the folder, itself* onto the CD. [after testing thoroughly, of course!]<br />
<br />
b] You already know of the differences between:<br />
&bull;&nbsp;local computer doc tree<br />
&bull;&nbsp;a server root/doc tree<br />
&bull;&nbsp;&nbsp; & URL's<br />
- yes?<br />
<br />
b] Well, think of the cd-rom [drive letter:] as your -<br />
/home/user/public_html &raquo;DIR &<br />
<!-- m --><a class="postlink" href="http://www.sitename.dom">http://www.sitename.dom</a><!-- m --> &raquo;LOCATION<br />
<br />
c] Now, from ANY drive letter, you should be able to have working links to your files as stated above. Re-cap:<br />
= "index.html" [since in SAME DIR as ROOT] & its stylesheet would be in the siteROOT with it, so:<br />
href=http://www.webdeveloper.com/forum/archive/index.php/"name.css" /><br />
anything linked from the index.html:<br />
= "/forum/pg.html" or<br />
= "images_suffix/filename.ext"<br />
<br />
Once into another page, it would link back to the index as:<br />
= "/index.html" & to its own images = "/images_location/name.ext"<br />
And finally (whew!) the .css for each page would be same as the index one naming - since they're in same loc. as their DIR.<br />
[If only ONE CSS - just put in siteROOT & refer to it same way...]<br />
<br />
Egads,<br />
El<!--content-->Just want to thank all the people that replied. <br />
<br />
THANK YOU!!!!!!!<br />
<br />
Chris<!--content-->
 
Back
Top