Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Password protecting a static page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-28-2009, 06:48 AM
 
gman gman is offline
 

eXpert
  
Join Date: Sep 2002
Posts: 211
 

Default Password protecting a static page

On a 4.2.2 cart I need to password protect a static page outside the xcart normal user system. It has to work with either an htaccess or php ran membership system.

Any ideas?
__________________
Gman



X-Cart Gold 4.6.0
Reply With Quote
  #2  
Old 07-28-2009, 05:59 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: Password protecting a static page

If its for 4.2.2 this is the wrong section.

As for an .htaccess option:

For server owners (Windows+SSH/Remote desktop/etc):

1) Go to http://aspirine.org/htpasswd_en.html
2) Enter username and password
3) Choose encryption type (SHA1 is strongest, plain is weakest.)
4) Press "Encrypt pass"
5) Go into notpad, paste that in. Save file as .htpasswd and be sure to select "All files" and not .txt
6) Move to C:\
7) Make .htaccess with the following:
Quote:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /.htpasswd
AuthGroupFile /dev/null
<Files FileYouWantPasswordProtected.php>
require valid-user

Place in the folder with the file you wish to have password protected.


That all assumes you have the .htpasswd in C:\
To change the location of the .htpasswd, change the line:
Quote:
AuthUserFile /.htpasswd

For C:\php\pub\ it would be:
/php/pub/.htpasswd
__________________
- Shane Munroe
Reply With Quote
  #3  
Old 08-02-2009, 05:57 PM
 
gman gman is offline
 

eXpert
  
Join Date: Sep 2002
Posts: 211
 

Default Re: Password protecting a static page

Now what if I only want certian memberships to see the page?
__________________
Gman



X-Cart Gold 4.6.0
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:46 PM.

   

 
X-Cart forums © 2001-2020