Go Back   Tech Support Forum > Design Forum > Web Serving and Management

User Tag List

htaccess and login

This is a discussion on htaccess and login within the Web Serving and Management forums, part of the Tech Support Forum category. L.S., For a fairly simple website I require some sort of login from the index page. I have a log-in


Closed Thread
 
Thread Tools Search this Thread
Old 07-11-2014, 11:55 AM   #1
Design Team
 
KoosHopeloos's Avatar
 
Join Date: Nov 2004
Posts: 625
OS: Windows XP Pro, Vista Ultimate, 10 Pro and Linux Mint browsing the web with FF, Opera, Safari and IE



L.S.,

For a fairly simple website I require some sort of login from the index page.

I have a log-in and password form box on the index page. When that is filled in (with the right log-in and password) I would like it to redirect to the index2 in a subfolder.

The log-in and password will be fixed.

I really would like to keep it simple and I understood that this can be done with .htaccess and .htpasswd. I've tried a couple of things, but for some reasons it doesn't work.

I'm completely new with this, guidence would be much appreciated!

Regards, Koos
__________________
Regards, KoosHopeloos

Emeritus member Design Team

KoosHopeloos is offline  
Sponsored Links
Advertisement
 
Old 07-11-2014, 02:36 PM   #2
Moderator
- Design Team
- Networking Team
 
Fjandr's Avatar
 
Join Date: Sep 2012
Location: Spokane, WA
Posts: 2,483
OS: Windows XP SP3, Windows 7 SP1, Debian, CentOS

My System


This is a fairly concise tutorial on creating a user and password for .htaccess:

Password protection with htaccess

As for the redirection, you can either use PHP to redirect once the page is loaded, or possibly use an .htaccess redirect (though I don't know if that will redirect before or after the login, or if the file needs to be specially constructed to make sure it takes place after). You'll also need to protect the pages that you're redirecting to, in order to make sure only the authenticated user can view them.
__________________

Fjandr is offline  
Old 07-14-2014, 11:50 AM   #3
Design Team
 
KoosHopeloos's Avatar
 
Join Date: Nov 2004
Posts: 625
OS: Windows XP Pro, Vista Ultimate, 10 Pro and Linux Mint browsing the web with FF, Opera, Safari and IE



Thanks Fjandr, worked like a charm.

In the end, I've added a log-in link to index2, which is inside the protected folder. Now, you can log-in 'normally'.

And as the pages are within the protected folder, you can not view these.

Regards, Koos
__________________
Regards, KoosHopeloos

Emeritus member Design Team

KoosHopeloos is offline  
Sponsored Links
Advertisement
 
Old 07-14-2014, 09:38 PM   #4
Moderator
- Design Team
- Networking Team
 
Fjandr's Avatar
 
Join Date: Sep 2012
Location: Spokane, WA
Posts: 2,483
OS: Windows XP SP3, Windows 7 SP1, Debian, CentOS

My System


Good deal, glad you got it working.
__________________

Fjandr is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question


» Site Navigation
 > FAQ
  > 10.0.0.2
Powered by vBadvanced CMPS v3.2.3


All times are GMT -7. The time now is 12:43 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.1.0 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright 2001 - 2018, Tech Support Forum

Windows 10 - Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts