studgate Posted December 6, 2009 Share Posted December 6, 2009 Hey guys, I am trying to secure a folder for only a few people. I am trying to secure the folder and then when the user logs in, redirect them to a page with information. A little help is highly welcome. thanks in advance guys! Quote Link to comment https://forums.phpfreaks.com/topic/184168-htaccess-help/ Share on other sites More sharing options...
whit3fir3 Posted December 10, 2009 Share Posted December 10, 2009 I am not exactly sure what you are looking for help with here. If you want to know how to secure a directory using .htpasswd file the best ways is if you have access to a copy of htpassword program. You can use htpassword to create the .htpasswd for you and save the password in an encrypted format. The basic usage syntax is as follows: htpasswd -c .htpasswd USERNAME It will then ask you for the password for the user that you provided. After the user has logged in you can then make the default page for that directory be an index.php file then use the PHP header command to pass a redirect header to the user. The syntax for the command is as follows: header('Location: http://www.example.com/'); Thanks, Whit3fir3 Quote Link to comment https://forums.phpfreaks.com/topic/184168-htaccess-help/#findComment-974506 Share on other sites More sharing options...
whit3fir3 Posted December 10, 2009 Share Posted December 10, 2009 If your server does not have PHP installed then I would suggest reading up on Apache ReWrite Rules. Quote Link to comment https://forums.phpfreaks.com/topic/184168-htaccess-help/#findComment-974508 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.