members area using .htaccess
Apologies to begin with... I'm a bit of a newbie and have what will probably be a really silly question for you all.
I have bought hosting with 123-reg (yes I know probably a big mistake)... I am trying to create a member area on my site.
Fair enough. I have the two files (password one has been encrypted). The .htaccess file contains the following:
require user USERNAME
allow from all
It has been stored in the dirctory that I want to protect.
Now my problem is that 123-reg support claim I needed to put .htpasswd file at the root... fair enough... but I cannot write any files to the root.
I have tried moving the file down a level to public_html and changing the path in .htaccess
Have I missed something obvious? Is the answer so simple that I just am not seeing it?
Any help would be very much appreciated.
They mean the root of your website, but that's not technically required either. Just looking at the above, my guess is that your path may be incorrect.
Save the following as PrintEnv.shtml
Add the following lines to your .htaccess file:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Navigate your browser to display the PrintEnv.shtml file from above and then take the path displayed from the line that starts:
AddType text/html .shtml
AddHandler server-parsed .shtml
54 68 65 42 65 61 72 4D 61 79
Many thanks! I used the above and got the path name Put that in the fle and it worked
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)