'Twas brillig, and zendlearner at 01/03/09 20:28 did gyre and gimble:
So far, the solution that I have in mind is to add a check in my
indexAction() function of my IndexController so that if the
$_SERVER['REQUEST_URI'] is not '/', then redirect to
ErrorController::errorAction().
A better solution would be to use the redirector helper to issue a 301
back to the / URI rather than erroring out.
But that said, it would be nice if route assembly could suppress the
terms "index" when constructing themselves, and perhaps even this
redirection was built in to the controller (e.g. as a plugin perhaps by
comparing the request uri from a reassembled route assuming that
unnecessary "indexs" can be suppressed?)
To do this tho', I think the route assembly logic will need some work,
especially with regexp routes. I've already got a few regexp routes that
automatically change their assembly based on how many paramaters are
passed in for this reason.
In terms of SEO and canonicalisation, it's generally accepted that to
have identical pages with two different names is a bad idea.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]