Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-08-2008, 03:18 PM
Junior Member
 
Join Date: May 2008
Posts: 4
Default .htaccess dir protection

i'm just starting with ZF but the first thing that i'm thinking at is:

- how can i create an area protected by .htaccess?

since i'm new at MVC model i can't figure out how to do it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-09-2008, 09:07 AM
Junior Member
 
Join Date: Mar 2008
Posts: 6
Default

There's plenty of sites out there with instructions how to do this...

4WebHelp - Password Protection
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-10-2008, 04:52 PM
Junior Member
 
Join Date: May 2008
Posts: 4
Default

is not exatly what i ment

i know i protect with .htaccess

but if in a normal sttructure i can have

/publicwebsite
/cms
/common
/images

and i would put my .htaccess in the /cms directory

in a MVC structur where do you put the .haccess?

let say i create a CMS and i want to password protect by .htaccess
where would i put it?

in the directory
/application/viewers/cms/
?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-11-2008, 11:52 AM
Junior Member
 
Join Date: Mar 2008
Posts: 26
Default

ZF Project outline should look something like this:
Code:
+application
   bootstrap.php
   +controllers
   +models
   +views
      +scripts
   ...
+public // server www root should be set here
   index.php // this file should require_once bootstrap.php file from application directory
   .htaccess // RewriteEngine on
                    RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
   +styles
   +images
   +someotherdate
   +protectedfolder
      .htaccess // RewriteEngine off and some other authentication logic
so if you go to http://www.mysite.com/protectedfolder you will get a nice dialog window which asks for user and password (feature of web server sending 401 http status code)

other thing is when you want to build application with protected area only for admin/users and authenticate them with login site - then you will propably use Zend_Authenticate which will check wheter user exists in database and supplied password is correct

Please read more in manual on ZF official site
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:24 AM.