Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

htaccess driving me nuts!


9 replies to this topic

#1 LisaT

  • Community Member
  • 109 posts
  • Real Name:Lisa Taylor

Posted 07 April 2005, 16:15

I have been struggling all day to get htaccess to password protect my catalog/admin directory so that only authorised people can access the admin pages. I contacted my web host and they told me to look at a tutorial online. So,
I followed the very clear instructions on - although he does neglect to tell you to upload in ASCII
But when I tried to access the admin pages I got a Page Not Found message.
I see that there is already a .htaccess file in my directory on install. Am I meant to overwrite that? Should I putting the .htpasswd file in a particular directory?
What am I doing wrong?
Please help as everything else about the install has gone really well

#2 keo

  • Community Member
  • 24 posts
  • Real Name:Keo g

Posted 07 April 2005, 17:01

Password Protection Code Generator

http://www.htmlbasix.com/passwordprotect.shtml

#3 Seekers-

  • Community Member
  • 31 posts
  • Real Name:Emil Larsen

Posted 07 April 2005, 17:36

hmm dont owerwirte the htacces in the catalog or admin folder. Make a new folder ex call it pass and put your real admin dir + your new htacces and the other password files into that


/catalog/pass/admin
/catalog/pass/htacces etc.


Remember to change path to admin dir if you change it.


Hopes that will help


From Emil Larsen

#4 circus_bricoleur

  • Community Member
  • 7 posts
  • Real Name:James Barton

Posted 07 April 2005, 19:49

Seekers-, on Apr 7 2005, 11:36 AM, said:

hmm dont owerwirte the htacces in the catalog or admin folder. Make a new folder ex call it pass and put your real admin dir + your new htacces and the other password files into that
/catalog/pass/admin
/catalog/pass/htacces  etc.
Remember to change path to admin dir if you change it.
Hopes that will help
From Emil Larsen

<{POST_SNAPBACK}>



Uh, I've had this same problem and I did replace the htaccess file for my admin directory. Things seem to work okay, but is it necessary for me to revert back and add a buffer directory like you suggest? Do you know what the original htaccess does?

Thanks,
JD

Edited by circus_bricoleur, 07 April 2005, 19:51.


#5 keo

  • Community Member
  • 24 posts
  • Real Name:Keo g

Posted 07 April 2005, 20:21

original /admin .htaccess file

# $Id: .htaccess,v 1.1 2003/06/20 00:18:30 hpdl Exp $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

<IfModule mod_setenvif.c>
  <IfDefine SSL>
    SetEnvIf User-Agent ".*MSIE.*" \
             nokeepalive ssl-unclean-shutdown \
             downgrade-1.0 force-response-1.0
  </IfDefine>
</IfModule>

# Fix certain PHP values

#<IfModule mod_php4.c>
#  php_value session.use_trans_sid 0
#  php_value register_globals 1
#</IfModule>


#6 Vger

  • Community Member
  • 16,978 posts
  • Real Name:R Anthony
  • Gender:Not Telling

Posted 08 April 2005, 00:45

The simplest way to protect your 'admin' folder is to use the Directory Protection or Password Protect feature available in your web hosting control panel. This feature writes the .htaccess and .htpasswd files for you.

Vger

#7 karelvo

  • Community Member
  • 6 posts
  • Real Name:karel van orshoven

Posted 11 April 2005, 21:15

Hello,

I don't have the option to secure any directory using the control panel of my webhost.
I created the .htaccess and the .htpasswd using a .htaccess and .htpasswd Code Generator.
After installing this I do get a logon screen but I can't login.

Then I used another generator but had the same problem, I can't login.

I also noticed that both generaters encrypted my password different.

Can someone please tell me (in simple words) how i can protect my admin folder?

Thank you.

#8 Vger

  • Community Member
  • 16,978 posts
  • Real Name:R Anthony
  • Gender:Not Telling

Posted 11 April 2005, 21:27

There are several possible reasons as to why .htaccess is not working for you:

1. Your hosting company does not allow the use of any files beginning with a period (dot) - such as Yahoo, Lycos
2. Your .htaccess file is not written correctly - and this can vary according to which type of server you are on.
3. You are on a Windows server, in which case .htaccess won't work anyway - as it is a feature of Apache. For Windoze servers you need to create a Login based on a text file e.g.
User = abc
Pass = 123

Vger

#9 karelvo

  • Community Member
  • 6 posts
  • Real Name:karel van orshoven

Posted 11 April 2005, 21:55

So I can't just use any code generator?
I first have to check wich server my webhost uses, right?

#10 Vger

  • Community Member
  • 16,978 posts
  • Real Name:R Anthony
  • Gender:Not Telling

Posted 11 April 2005, 23:45

Yes, the good code generators give you multiple options to create your .htaccess files, based on your type of server.

Vger