Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-11-2013, 08:50 PM   #1
Lace
Too lazy to set a custom title
 
Lace's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 16,116
Htaccess + htpasswd question

Need to use htaccess and htpasswd to protect all pages besides index.html along with all images used outside of the index.

Here's what I have so far, but it's pw protecting the index.html as well.

Code:
AuthName "Site Name" 
AuthType Basic 
AuthUserFile /path_to_/.htpasswd
Require valid-user

<Files "*">
Require valid-user
</Files>

<FilesMatch "(index\.html|logo\.png)$">
Allow from all
Satisfy any
</FilesMatch>
__________________
Your Paysite Partner
Strength In Numbers!
StickyDollars | RadicalCash | KennysPennies | HomegrownCash
Lace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-11-2013, 08:59 PM   #2
bl4h
Confirmed User
 
Join Date: Jul 2006
Location: Philadelphia
Posts: 1,282
not sure but I can almost guarantee that whatever youre doing, youre doing it the hard way
bl4h is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-11-2013, 09:02 PM   #3
Lace
Too lazy to set a custom title
 
Lace's Avatar
 
Industry Role:
Join Date: Mar 2004
Posts: 16,116
Quote:
Originally Posted by bl4h View Post
not sure but I can almost guarantee that whatever youre doing, youre doing it the hard way
Well, yeah. I could set it up in a folder, but I'd rather not have to move everything.
__________________
Your Paysite Partner
Strength In Numbers!
StickyDollars | RadicalCash | KennysPennies | HomegrownCash
Lace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-11-2013, 09:07 PM   #4
TisMe
Confirmed User
 
Join Date: Aug 2008
Posts: 1,719
No expert but I think you need an ignore index line.

Something like this:

Code:
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
TisMe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-12-2013, 02:02 AM   #5
Paz
Confirmed User
 
Paz's Avatar
 
Industry Role:
Join Date: Jun 2012
Posts: 457
Gottit working on my server in a folder www.carlparry.com/gfy/

Quote:
# Set exception for /gfy/index.html and set as variable AdminUri for use later
SetEnvIf Request_URI "^/gfy/index.*$" AdminUri

# Setup the password protection (standard folder protect)
AuthUserFile /home/xxxxxxxxxx/carlparry.com/gfy/.htpasswd
AuthName "GFY - folder protected"
AuthType Basic
AuthUserFile ./.htpasswd
Require valid-user

# Now add the exceptions for matched URL's index.html (not standard)
Order Deny,Allow
Deny from all
Allow from env=AdminUri
Satisfy any
Cheers,
Paz.
Paz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-12-2013, 02:19 AM   #6
KaliC
Sexy Beast
 
KaliC's Avatar
 
Industry Role:
Join Date: Jan 2005
Posts: 617
Quote:
Originally Posted by Lace View Post
Well, yeah. I could set it up in a folder, but I'd rather not have to move everything.
Yeah, it's best to keep the htaccess files and folders in a separate protected folder.
__________________
AdultWebHosting.com
KaliC is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.