My question is simple, how do I achieve SEO optimizing tasks with symfony 1.4?
The first problem, which isn’t only a SEO problem but rather a symfony 1.4 in general is that symfony does a strange thing with URLs like:
module/action
AND
module/action/
The first one works, the second one is rejected or throws an error, OR what is most common works, but does not redirect (with a 301) to the first one, which should be a convention, since SEO-wise those urls are not identical.
This shouldn’t be.
This a common error in symfony, this trailing slash can cause trouble. Some will tell you that this is normal because the first one is a file and the second one is a directory. Since you can’t browse directory with symfony, it throw an error.
But you have two options as a work around, use htaccess or use a custom routing.
htaccess: (from here)
custom routing: (from here)
/apps/frontend/config/factories.ymlCreate the class:
apps/frontend/lib/myPatternRouting.class.php