Author |
Message |
bluesky
Junior WebHelper
Joined: 26 Sep 2006
Posts: 6
|
Posted:
Tue Sep 26, 2006 9:09 pm (18 years, 3 months ago) |
|
I followed the guide at this to generate an .htaccess and .htpasswd file (great guide btw). I placed the .htaccess and .htpasswd files in /test on my webspace. When I attempt to browse to that dir on my webspace, I am prompted for a username/password, but when I enter them and hit OK, the box just keeps popping up asking again and again.
I can only access the space via FTP.
Here is my .htaccess file:
Code: | AuthName "Restricted Area"
AuthType Basic
AuthUserFile /.htpasswd
AuthGroupFile /dev/null
require valid-user |
Here is my .htpasswd file:
I'm thinking the AuthUserFile line in my ./htaccess isn't correct. Do I need to use the absolute UNIX path to my web page home dir? The tech. support at my ISP tells me they have no way of getting that information to me. Is there some way I can get the abs path to make this work, OR is there another way to setup the .htaccess file? |
________________________________ http://encoding.n3.net <-- for all your CD and DVD backup needs. |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Tue Sep 26, 2006 10:11 pm (18 years, 3 months ago) |
|
You should be able to use a relative path. If the files are in the same directory, try using Code: | AuthUserFile .htpasswd | or Code: | AuthUserFile ./.htpasswd |
I'm not 100% sure that'll work though.
If it doesn't, create a .php file with the following contents (assuming of course that your host supports PHP): Code: | <?php echo $_SERVER['DOCUMENT_ROOT']; ?> |
Then visit that page in your browser and you should find the absolute path to your home dir. |
________________________________
|
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Tue Sep 26, 2006 11:27 pm (18 years, 3 months ago) |
|
I personally would question why the server techs are unable (or perhaps just unwilling) to give you that information. Seems very strange to me. |
________________________________ It's turtles all the way down... |
|
|
|
bluesky
Junior WebHelper
Joined: 26 Sep 2006
Posts: 6
|
Posted:
Tue Sep 26, 2006 11:55 pm (18 years, 3 months ago) |
|
Daniel wrote: | You should be able to use a relative path. If the files are in the same directory, try using Code: | AuthUserFile .htpasswd | or Code: | AuthUserFile ./.htpasswd |
|
I actually tried that prior to posting... same result.
Daniel wrote: | If it doesn't, create a .php file with the following contents (assuming of course that your host supports PHP): Code: | <?php echo $_SERVER['DOCUMENT_ROOT']; ?> |
Then visit that page in your browser and you should find the absolute path to your home dir. |
This is interesting. I made a blank text file with that line as the sole contents. When I browsed to it (http://mysite.com/blank.php) firefox wanted to download "blank.php" ... I must have done that incorrectly or they don't support php? |
________________________________ http://encoding.n3.net <-- for all your CD and DVD backup needs. |
|
|
|
bluesky
Junior WebHelper
Joined: 26 Sep 2006
Posts: 6
|
Posted:
Wed Sep 27, 2006 12:13 am (18 years, 3 months ago) |
|
adam wrote: | I personally would question why the server techs are unable (or perhaps just unwilling) to give you that information. Seems very strange to me. |
Whenever I call into the tech support department they claim that they have no web server techs; they are outsourcing the webservers to a 3rd party and cannot provide me with the name of the 3rd party. It's starting to get on my nerves... this isn't an off-the-wall request |
________________________________ http://encoding.n3.net <-- for all your CD and DVD backup needs. |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Wed Sep 27, 2006 6:44 am (18 years, 3 months ago) |
|
Do they advertise .htaccess/.htpaswd support? If so they have an obligation to provide this information. If not then I think we're out of options... Is it a well known ISP? If so maybe you can find the path somewhere on the web. |
________________________________
|
|
|
|
bluesky
Junior WebHelper
Joined: 26 Sep 2006
Posts: 6
|
Posted:
Wed Sep 27, 2006 8:18 pm (18 years, 3 months ago) |
|
They don't advertise this support anywhere that I can find. I have tried googling around for it with the ISP name, webroot or web root. Can you think of a better set of key words to use? |
________________________________ http://encoding.n3.net <-- for all your CD and DVD backup needs. |
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Thu Sep 28, 2006 6:41 am (18 years, 3 months ago) |
|
You could try "document root" too, or "path AND htaccess AND ISP_name". |
________________________________
|
|
|
|
bluesky
Junior WebHelper
Joined: 26 Sep 2006
Posts: 6
|
Posted:
Wed Oct 11, 2006 12:00 am (18 years, 2 months ago) |
|
FINALLY got it!
Just upload a file to via ftp and it printed the absolute path in the ftp log when the put command started! I must have spen 4+ hours on the phone with their tech morons and all it took was a little serendipity! |
________________________________ http://encoding.n3.net <-- for all your CD and DVD backup needs. |
|
|
|
adam
Forum Moderator & Developer
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Wed Oct 11, 2006 7:47 pm (18 years, 2 months ago) |
|
You should call the techs again and let them know what the path is |
________________________________ It's turtles all the way down... |
|
|
|
|
Page generation time: 0.133297 seconds :: 17 queries executed :: All Times are GMT
Powered by
phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme