473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

My mainpage loads without confirming login...

blackgoat
Hi!

I'm making a website using perl and javascripting. I have a login page and a mainpage that should load when the given login is validated. It works fine if I star with the login page and enter user name and password. But the problem is, that the mainpage loads even by directly typing its address in the address bar. How do I make sure that if this is attempted without loging in first, then the page should not load and redirect to the login page.

Pls help

Thanks

BG
Mar 8 '10 #1
6 1189
Dormilich
8,658 Expert Mod 8TB
set a password in the Apache .htaccess file (if you’re on an Apache server)
Mar 8 '10 #2
but i'm not using apache.. is there no other way??
Mar 8 '10 #3
Dormilich
8,658 Expert Mod 8TB
this you should look up in your server documentation. logging in is best handled on server stage.
Mar 8 '10 #4
but is dere no way to code it somehow?? u know like if i could add some code to my main page that could check before loading if login has been done or not?? if not, user is redirected to login page...
Mar 8 '10 #5
Check for login cookies at the start of the Perl script, before you output any HTML, if you find them, run them past the database to see if they're valid, and then make the appropriate action from there.
If the cookies checkout, load the page, if not, send them over to a login page. Simple. =P

How have you got your login script setup? Because it should be integrated into any pages that are meant to be login only...

Hell, I normally integrate the login script into -every- page, and display some control panel type links in the page footer if logged in, and a login link if not.
Mar 8 '10 #6
Thanks !!!!!!!!!!!!!
Mar 8 '10 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: dmcconkey | last post by:
Hi folks, I've been searching for a while and haven't found my specific question anywhere else. If this has already been asked, please accept my appologies and point me to the appropriate...
11
by: Ghazan Haider | last post by:
I am posting this for the lack of a better newsgroup, and for the knowledge of people here, and because its only partially OT. We have a bunch of users with their computers at work. There are...
0
by: Peter Brown | last post by:
Hello! I am stepping through a text book that sets up different websites. The one I am testing is user registration. I set up the scripts and this is what I observe: Login (verifying...
1
by: anonymous | last post by:
Hi all, I've been searching the way to achieve the following task. But no luck so far. I have a web site(main site), which requires authentication. This authentication is set at Windows...
3
by: Bob Johnson | last post by:
I have looked through the docs for the XML documentation tags in the C# Programmer's Reference, and I haven't come across a "MAINPAGE" tag like you find in Doxygen. This tag is nice for when you...
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
3
by: bill | last post by:
I need to open a asp.net web form from a classic asp page, and pass a username and password to the asp.net page. The username and password exist as session variables in the classic asp...
8
by: chris_fieldhouse | last post by:
Hi fairly new to php, but picking it up quite well. the question I have, is it possible for a php script which is used to validate values submitted in a form, to then post these values onto...
3
by: burrashiva | last post by:
:( ::) Hello there, I recently started Web Designing with PHP, Javascript and AJAX. I am facing a problem which I will try to explain: If I am successful in conveying the problem to you...
12
by: tvnaidu | last post by:
I have Two kinds of web pagess, one is for control page for only admin login, another one is to view status for user login. initially both html files can view with 192.168.0.10/control.htm and other...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.