News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

One Page website

Started by shankle, December 16, 2005, 09:54:26 PM

Previous topic - Next topic

shankle

Most of the web pages I have seen have multiple pages.

I have one that has ONLY one page.
How do I code the index.html to point to the programs
on the page without creating another page.

I'm not sure I am asking the question correctly.
but the code I have does not work.

An example would be most appreciated.
Regards,
JPS :(
The greatest crime in my country is our Congress

petezl

The "Hacking html" site explains these basic commands very well!
http://www.links.net/webpub/html/

Peter.
Cats and women do as they please
Dogs and men should realise it.

tenkey

If you simply want to be able to jump to a "bookmark" within a page, you create a bookmark with the <a> tag...

<a name="BookMarkName"></a>

Then you link to it with...

<a href="#BookMarkName">...text of link...</a>
A programming language is low level when its programs require attention to the irrelevant.
Alan Perlis, Epigram #8

shankle

What I want to do is have the user be able to click on a label on the screen,
which will take him to the directory where the programs can be downloaded.

So far I have come up with:
<a href="http://gggsoft.com/htdocs/tall">[Tall]</a>

Of course this doesn't work... 

Thanks for the help,
JPS
The greatest crime in my country is our Congress

arafel

If I understood correctly, you want some link simply point to a dir containing the files?

<a href="tall/">[Tall]</a>

with a slash after the dir name. where tall is a path relative to the location of index.html.

*web server should be configured to allow direct access to directories. otherwise you'll get access denied error.

shankle

Many thanks for the help.

I tried the following and it didn't work.
It gave the "Page not found message"

<a href="http://gggsoft.com/htdocs/tall/">[Tall]</a>

JPS :(
The greatest crime in my country is our Congress

tenkey

As arafel pointed out, you also need to do some non-HTML stuff to get it to work. Check with your web host.
A programming language is low level when its programs require attention to the irrelevant.
Alan Perlis, Epigram #8

shankle

Well it just gets deeper.....
In order to enable directory listings, I have to create an ".htaccess" file in  the directory in question and add the following on the site so that users can download files.
I assume that the following code is for Apache. I have no idea how to do this.

          options +Indexes
         
         $ cd www.example.com/htdocs/foo
         $ echo "options +Indexes"> .htaccess

I went up on Jeeves and typed in Apache .htaccess
and got more than I bargained for.

I have a directory called Tall. How do put code in there to allow access
by users?

Thanks for any help,
JPS
The greatest crime in my country is our Congress

drhowarddrfine

It might be better to just go to apache.org web site and look at the docs.  I've been using Apache for a while now but never the .htaccess files. 

arafel

shankle,

Add "Options +Indexes" line to .htaccess file in required dir. This line means that the current and all sub-directories should be viewable.


Quote from: shankle on December 18, 2005, 11:34:44 PM
         $ cd www.example.com/htdocs/foo
         $ echo "options +Indexes"> .htaccess

Example shows how to do this from a shell, i.e. connect to your account on the server. assuming you are now in htdocs directory (which is default in most cases) type:

cd Tall

you will be switched to Tall dir. than add needed line with:

echo "Options +Indexes" > .htaccess


Or create new text file called .htaccess in notepad, add "Options +Indexes" (without the brackets) and upload it to the Tall dir.

Oh and don't forget to check if at all htaccess usage is enabled on the server...

shankle

I thought since you all were so helpful to me that I should tell you how I got this
problem to work so others would not have to go through the same agony.

Purpose: to enable users to reference 4 directories under htdocs on my ISP and be
   able to download them.
1). create a file called ".htaccess" without any (.txt) after it.
     In this file put    Options +Indexes
     This goes under htdocs on the ISP.

2). In the html code I placed the following href statements:
   
       <a href="/tall">{Tall]</a>
       <a href="/blah2">{blah2]</a>
       <a href="/blah3">{blah3]</a>
       <a href="/blah4">{blah4]</a>

This works with the parameters of my ISP.
Maybe it will be different on other ISPs.

JPS :P
The greatest crime in my country is our Congress