Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-01-01 22:33:43
- sbo
- Member
- Registered: 2006-06-06
- Posts: 47
Section password protection
Hello,
I am using Textpattern 4.0.3.
I have a section i called ‘Blog’; i would like it to be password protected.
I have tried the ‘.htaccess’ procedure using this script :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*) ../index.php
</IfModule>
AuthType Basic
AuthUserFile /path/on/server/to/.htpasswd
AuthName “Only for registered users”
require valid-user
But when i try to load the page ‘http://example.com/Blog’, just after the login/Password window, i get an error message :
‘Bad Request
Your browser sent a request that this server could not understand.
Apache/1.3.37 Server at example.com Port 80’
My website is hosted by ‘ovh.com’.
Any idea ?
Thanks in advance.
Last edited by sbo (2007-01-01 22:34:03)
Stéphane.
Offline
#2 2007-01-01 22:48:34
- sbo
- Member
- Registered: 2006-06-06
- Posts: 47
Re: Section password protection
I found the solution :
RewriteRule ^(.*) /absolute/path/to/index.php
Stéphane.
Offline
#3 2007-02-11 07:47:50
- tyee
- New Member
- Registered: 2005-09-01
- Posts: 5
Re: Section password protection
I tried this on my other CMS and it took me to my actual index.php page instead of the dynamically generated database page that it should have.
Should this work on any dynamic CMS or just textpattern??
Last edited by tyee (2007-02-11 07:49:10)
Offline
#4 2007-02-11 13:33:43
- wspence
- Member
- Registered: 2006-09-03
- Posts: 84
Re: Section password protection
does textpattern automagicaly keep maintain the user db for this? is this a mod? i may have to use pw protection on my blog soon so i would like to know. thanks!
Offline
Re: Section password protection
No, this .htaccess password protection method does not use TXP user/passwords at all.
Offline
#6 2007-02-11 20:31:02
- tyee
- New Member
- Registered: 2005-09-01
- Posts: 5
Re: Section password protection
ruud A question for you ruud. I’m trying to understand this.
When someone clicks on the link for “blog” in textpattern, apache looks in the folder that was really created on the server called “www.mysite.com/blog” , finds .htaccess, and creates the password sign-in window. After entering the password, apache sends this “blog” url via the “RewriteRule ^(.*) ../index.php” function, to index.php, which then sends you to “www.mysite.com/blog”.
Is this correct?
tyee
Offline
Re: Section password protection
Sounds about right, yes.
Offline
Pages: 1