views:

72

answers:

1

Hi all,

Right now ZF defaults to /

I would really like / to redirect to /sort/all

I've changed my default route in routes.ini to

routes.default.route = "/:controller/:filter"
routes.default.defaults.controller = sort
routes.default.defaults.action = sort
routes.default.defaults.filter = all

which displays correctly but the URL doesn't change.

I don't want a user to bring up / , but i still have /contact /about so i can't just move the install path

Its probably an htaccess issue, but i didn't want to break zend default dispatching.

A: 

I would really like / to redirect to /sort/all

How about letting IndexController::indexAction() just contain:

return $this->_redirect('/sort/all');

That would be easy to maintain once you'd want to use the root uri for something else.

chelmertz
duh. i've been working too many hours straight :)Thank you much, chelmertz
bonez
You should probably check out the method which generates headers that suits your needs the most ("temporarily moved" vs "permanently moved" for example.)
chelmertz