I thought I could organize my movie files by writing a quick and dirty HTML script for them. I read a few tutorials on HTML (not CSS) and it seemed simple enough. So I made this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="DocumentRoot">

<head>
	<title>Media</title>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<meta name="generator" content="Geany 0.16" />
</head>

<body>
	<h1 class="title">Video Shortcuts</h1>

<ul class="simple">

<li><a class="reference external" href="/media/disk-2/Movies">Movies</a></li>
<li><a class="reference external" href="/media/disk-2/Music_Videos">Music Videos</a></li>
<li><a class="reference external" href="/media/disk-2/TV_Shows">TV Shows</a></li>
<li><a class="reference external" href="/media/disk-2/Tut_Vids">Video Tutorials</a></li>
</ul>

</body>
</html>

At first glance, it seemed to do what I wanted, but then I noticed that when I open a link, it gives me an option to "Up to higher level directory". I can follow this link all the way up to my root folder (Linux/Ubuntu). Now I have no intentions of publishing this page, it is simply for my own personal use, but I still don't like being able to browse my entire computer through a set of links in Firefox. How can I make this page the top level directory?

Recommended Answers

All 2 Replies

You are linking to folders with your code. Without an index page, your system is returning instead a file listing, which always does what you don't like.

So make an index.htm page for each folder, listing the files and linking to them. And make the link not to the folders, but the index pages.

Cool. Thanks. I somehow knew this wouldn't be as wasy as it looked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.