Solved

HTML - Password Protect a Web Page ?

Posted on 2010-11-17
6
752 Views
Last Modified: 2013-12-25
How can I password protect a web page that would reqire a user to key a given password to gain access to that page.....  The page is in HTML and I'm using Yahoo's SiteBuilder to contruct the page.  Also, what is a Good/Free HTML editor to use for a beginner
0
Comment
Question by:Qmez
6 Comments
 
LVL 5

Expert Comment

by:jcott28
Comment Utility
0
 
LVL 5

Expert Comment

by:jcott28
Comment Utility
Also, if you're using Yahoo Site builder already, just use it's HTML editor.

http://webhosting.yahoo.com/ps/sb/index.php
0
 
LVL 7

Expert Comment

by:whosbetterthanme
Comment Utility
Do you know what the web server is? Apache? IIS?

Do you have access to the web server settings via a control panel or directly?

If Apache you can use htaccess or if IIS you can use Authentication is IIS.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 44

Expert Comment

by:scrathcyboy
Comment Utility
You password protect a folder where the webpage is located by login to that folder.  That is the way it is done on a normal shared hosting server.  Yahoo may be the same or different.
0
 
LVL 2

Expert Comment

by:Schells_Web_Design
Comment Utility
You can use a javascript to password protect a page with a password. It's not ultra-secure, but it works. If you created a paga named:  "protected.htm" the password required for this script would be "protected"  (no quotes).  Just put this script on any page to show a password box.

The script assumes your pages are in teh same directory and ending in .htm. If it's .html or .php, change the

var suffix = ".htm" to var suffix = ".html", etc.

if your pages are in another directory, you can eliminate the ".htm" and the password will be the folder that is protected. Quick little script, but again ... not ultra-secure. .htaccess is much better.

<SCRIPT language=JavaScript>  
<!--  
var suffix = ".htm"  
var pass_msg = "Enter your password below to view your page.<P>";  
function go_there()  
{
location.href = "../" + document.pass_form.pass.value + suffix;
}
document.write('<br><form name="pass_form" onSubmit="go_there();return false">' + pass_msg + '<br><input type="password" name="pass" size="20" value="">' + '&nbsp;<input type="button" value="OK" OnClick="go_there()"></form>');  
// -->
</SCRIPT>

0
 
LVL 38

Accepted Solution

by:
Insignificant Volunteer earned 500 total points
Comment Utility
Hi Qmez

Online Web Site building "Tools" are quite often slow and limited, and may not allow the flexibility of using additional "script" code in your pages.  You need to find that out.

Have a look at Kompozer for a free Web Page editor that will be a very good starting point and may do everything you want in the following years:

http://kompozer.net/

You won't get any cheaper than free, and it is a WYSIWYG editor, which means "What you see is what you get" ... well, it never is actually, but it's a good approximation of what a site visitor would see.

Many of the "free HTML editors" you will find in searches using those terms are programs that you write the HTML code and get a split-pane view of how it should look, rather than ones that allow you to insert and arrange content like images directly into the editor in a similar way to a word processing application, and then "preview in browser".

Kompozer is based on the same code that is used in other Mozilla projects like Firefox browser. It started out as "Composer" being integrated right into the Mozilla Suite (browser, email, etc) and then branched off as "NVU" which you will probably have seen listed somewhere if you have searched for free editors. I have always been disinclined to use NVU because it tries to push the "Intuit Web Building Systems" and domain names in your face:
http://www.net2.com/nvu/about.html

Kompozer allows you to "publish" your website straight to your web storage using FTP. That means File Transfer Protocol and is a standard way to log in and transfer files from computer to server and vice versa.  You would need to find out from the Yahoo help pages for your webspace whether they allow FTP uploads, and if so what the web address is to the root of your storage area.  There should be a page of "settings" for those who prefer to use their own upload methods.  You just set these in Kompozer and you can can upload new, overwrite and update existing, or delete pages and files on or from your web storage area.

The secret to creating your website is the organisation of your pages, files like images and linked documents, and your scripts.  That is something that many online web building tools don't allow you to control. Having your pages and files arranged in separate folders according to the pages they relate to, or according to the nature of the files, makes it much easier to keep track of content once your site grows and more content is added.  If you need to modify a particular page, or an image that shows in a page, you should be able to locate all the files used by that page efficiently.

Having FTPd your locally stored "website to the Server, you will have a mirror image of the content on the server, and some editors allow you to place these side by side and use drag and drop copying, moving, etc between the two and also directly on the server.

If you didn't like the Kompozer method of "publishing" the site using FTP, then there is a great and absolutely free FTP application by CoffeeCup software:
http://www.coffeecup.com/free-ftp/
That's what I use, but you will realise if you search for "free FTP" that there are a lot more quality FTP applications for free than there are free "drag and drop" Web Page Editors, eg. FileZilla:
http://filezilla-project.org/

The decision is yours whether you persist with the Yahoo site builder tools and just practice with eg. Kompozer "offline" for now, but I would say that you don't really want to create too much content on the yahoo web space if you intend to later use something like Kompozer.

The reason I say this is that online site builders create quite a lot of their own quirky code and file hierarchies that suit their intentions.  To later try and update the content with pages created in your installed editor can leave a mish-mash of loose files and strange file and folder names.  Downloading, re-editing (ie. removing all the yahoo-centric stuff), and uploading pages that were already created on the yahoo webspace by their site builder can be difficult because of the way they were written.

Better to start now and decide on naming conventions for files, hierarchy for folders, etc, and upload a brand new website to replace the old when you are ready.  There is a lot of help online that gives advice about organising files and folders for a website.

Hope this helps
Bill
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article discusses how to create an extensible mechanism for linked drop downs.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now