Routing mechanism in symfony

Written on March 20, 2008 – 5:17 pm | by Sanil S
Post Page Rank

Symfony Logo

Symfony is one of the coolest framework for web application development in php I have ever used. We can make a blog application in less than an hour, such a simple the framework it is.

Symfony is purely MVC based framework. We can build application very fast using this framework, as a lot of configuration files are there to manage and configure web application properties. Only Symfony developers need to care about this topic. The modules in the symfony application can have different actions. Lets say a module ‘user’ with action ‘login’ carry out the user login of a client session. Then the applications login session’s URL may be something like this http://myapp.com/index.php/user/login. This can’t be simple recognized by search engines. So rewriting those URL to http://myapp.com/login make sense to search engines. Now i am going to discuss how it can be achieved simply by editing a configuration file, routing.yml.

Simply edit routing .yml in ROOT_DIR/apps/application name/config folder.

Add a conf like below

routing

This will routes the request from http://myapp.com/login to http://myapp.com/index.php/user/login. But it is happening only on the application server so the search engines are not aware about this internal routing.

Related posts

Posted in » Web

One Response

anybody here know of a good site to find more info on Php Developer India? I’ve got this site bookmarked and im gonna keep checking it out, but i still would like to find a site that covers Php Developer India a little more thoroughly..thanks


Php Developer India on Apr 3, 2008 | Reply

Leave a comment