I am using symfony 1.0 and have set routing for few URLs as below.
static_pages:
url: docs/:page.htm
param: { module: docs, action: index }
Now, I have set routing for a different kind of URL.
URL is http://news4u.com/search/description/id/3/css/a/act/a
I have set routing as below
description:
url: /search/description/id/:id/css/:manu/act/:mgh
param: { module: search, action: description}
Is this correct format to get values of ‘css’ and ‘act’. at time when URL is missing css parameter, i mean if url is as below:
http://news4u.com/search/description/id/3/css//act/a
the value of – getRequestParameter(‘css’) is showing as ‘act’ and
the value of – getRequestParameter(‘act’) is empty
So, i tried to apply routing and please correct me if am wrong. I am not getting desired out put using above routing configuration.
You don’t necessarily need to specify “id”, “css” and “act” as parameters in your routing.yml file unless you’re using their presence in the URL to send users to the search module and description action.
Using the following rule in your routing.yml would still work:
Then you should be able to use
to generate a link like this: /search/description/id/4/css/something/act/blah