GetDotted Domains

Viewing Thread:
".htaccess & .htpasswd"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sun 28/12/08 at 17:37
Regular
Posts: 4
Hi
I am trying to set up in a directory on one of my sites restricted access by using .htaccess method. I am trying to save my file as .htaccess but it keeps saving as .htaccess.txt - is there any easy way of renaming this OR is there any easier way of restricting web page access?

thx
Sat 24/01/09 at 23:34
Regular
"wheres the Any Key?"
Posts: 161
Another way to solve this prob is by using your MySQL database.

Check out my reply to your Database question.

If you want i can email you a zip file which contains all pages setup and ready to upload to your site plus the SQL query that you can paste into your Database to create the required fields.
But to do this i will need your email address.

with a simple database table and a few PHP pages you can allow or deny access all or selected page of your website.

to achieve this you need to use your Database, PHP coding and session variables,

When a visitor tries to access a page the PHP code first checks the session variables to see if the visitor is logged in as a member, if the visitor is logged in as a member the page will display as normal, if they are not logged in an alternative page will display with a message of your choice ie, sorry but access has been denied, click here to log in or click here to sign up.

If you only want people you know or even staff members to have access then dont offer a signup form, you can simple insert usernames and passwords to the database yourselve and then inform the nessarsary people of those details, those people can then type in and submit thier username and password into the PHP login page. The PHP code will then compare the submitted username and password against the usernames and passwords in the database, if the submitted details MATCH the details in the database the required page is displayed and a new $_SESSION is started,which contains your if the submitted details DO NOT match the details in the database they are redirected to a ACCESS DENIED page.

If your members only area consists of more than 1 page you need to include a small piece of PHP code on each page that checks if you have access, The small piece of PHP code simply checks if a $_SESSION has been started and contains the correct username, if so then continue, if not they are redirected to a ACCESS DENIED page.
Mon 29/12/08 at 12:26
Staff Moderator
"Aargh! Broken..."
Posts: 1,408
This is probably due to the software you are using to either create or upload your .htaccess files. We recommend using an FTP client such as FileZilla, which is free (Google it). This will allow you to upload .ht... files correctly or rename the ones with a .txt extension.
Sun 28/12/08 at 17:37
Regular
Posts: 4
Hi
I am trying to set up in a directory on one of my sites restricted access by using .htaccess method. I am trying to save my file as .htaccess but it keeps saving as .htaccess.txt - is there any easy way of renaming this OR is there any easier way of restricting web page access?

thx

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Simple, yet effective...
This is perfect, so simple yet effective, couldnt believe that I could build a web site, have alrealdy recommended you to friends. Brilliant.
Con
LOVE it....
You have made it so easy to build & host a website!!!
Gemma

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.