osCommerce Community Support Forums: htaccess driving me nuts! - osCommerce Community Support Forums

Jump to content

Corporate Sponsor


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

htaccess driving me nuts! Rate Topic: -----

#1 User is offline   LisaT Icon

  • Find Posts
  • Group: Community Member
  • Posts: 109
  • Joined: 16-March 05
  • Real Name:Lisa Taylor

Posted 07 April 2005 - 04:15 PM

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
0

#2 User is offline   keo Icon

  • Find Posts
  • Group: Community Member
  • Posts: 24
  • Joined: 30-November 04
  • Real Name:Keo g

Posted 07 April 2005 - 05:01 PM

Password Protection Code Generator

http://www.htmlbasix...rdprotect.shtml
0

#3 User is offline   Seekers- Icon

  • Find Posts
  • Group: Community Member
  • Posts: 31
  • Joined: 20-February 05
  • Real Name:Emil Larsen

Post icon  Posted 07 April 2005 - 05:36 PM

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
0

#4 User is offline   circus_bricoleur Icon

  • Find Posts
  • Group: Community Member
  • Posts: 7
  • Joined: 04-April 05
  • Real Name:James Barton

Posted 07 April 2005 - 07:49 PM

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



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

This post has been edited by circus_bricoleur: 07 April 2005 - 07:51 PM

0

#5 User is offline   keo Icon

  • Find Posts
  • Group: Community Member
  • Posts: 24
  • Joined: 30-November 04
  • Real Name:Keo g

Posted 07 April 2005 - 08:21 PM

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>

0

#6 User is offline   Vger Icon

  • Find Posts
  • Group: Community Member
  • Posts: 16,978
  • Joined: 22-December 03
  • Real Name:Miss Rhea Anthony
  • Location:Norfolk, United Kingdom

Posted 08 April 2005 - 12:45 AM

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
0

#7 User is offline   karelvo Icon

  • Find Posts
  • Group: Community Member
  • Posts: 6
  • Joined: 10-April 05
  • Real Name:karel van orshoven

Posted 11 April 2005 - 09:15 PM

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.
0

#8 User is offline   Vger Icon

  • Find Posts
  • Group: Community Member
  • Posts: 16,978
  • Joined: 22-December 03
  • Real Name:Miss Rhea Anthony
  • Location:Norfolk, United Kingdom

Posted 11 April 2005 - 09:27 PM

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
0

#9 User is offline   karelvo Icon

  • Find Posts
  • Group: Community Member
  • Posts: 6
  • Joined: 10-April 05
  • Real Name:karel van orshoven

Posted 11 April 2005 - 09:55 PM

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

#10 User is offline   Vger Icon

  • Find Posts
  • Group: Community Member
  • Posts: 16,978
  • Joined: 22-December 03
  • Real Name:Miss Rhea Anthony
  • Location:Norfolk, United Kingdom

Posted 11 April 2005 - 11:45 PM

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

Vger
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic