Hello!

I'm using the Zend controller on a new site and have a newbie question.  So
far, I've been using the controller without any problems.  I want to add an
admin area to my site (www.mydomain.com/admin), and I think it would be best
to create a new series of controllers to handle *just* the admin area.

In my first attempt at solving this problem, I tried using the following
rewrite rules:

RewriteEngine on
RewriteRule admin admin_index.php [L]
RewriteRule !\.(js|ico|gif|jpg|png|css|swf)$ index.php

(On the side: admin_index.php is basically the same thing as the standard
index.php, but in it I specify a new path to the controllers directory,
namely ../application/controllers/admin.  I'm putting my admin controllers
in there.)

My rewrite rule doesn't quite cut it.  If I try to go to the page:
http://www.mydomain.com/admin, the request gets sent to admin_index.php,
like I want, but the action is set to "admin", since that's the first
parameter after the domain name.

I want to be able to say: http://www.mydomain.com/admin/products/list or
http://www.mydomain.com/admin/products/edit/id/12

Thanks for your thoughts on the subject!  Am I approaching this correctly?
- Bret


-- 
View this message in context: 
http://www.nabble.com/How-to-set-up-controller-for--admin-area--tf3869094s16154.html#a10961930
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to