tags:

views:

32

answers:

1

Hi Experts,

I am working in cakephp.i have done rewrite url for all forms and links. and i have done server side validation through model. but when server side error is generate then url rewrite not working

one form i have done urlrewrite for that like

Router::connect('/employers/edit-securitydetail/:id', array(
    'controller' => 'fj_employers',
    'action'     => 'editSecurityDetail',
    'id'         => '[0-9]+'
));

then i can access this controller using this url employers/edit-securitydetail/1

when server side error is generate then url change to fj_employers/editSecurityDetail/1

can anyone help me

A: 

Try putting a second route in that looks like this:

Router::connect('/employers/editSecurityDetail/:id', array(
    'controller' => 'fj_employers',
    'action'     => 'editSecurityDetail',
    'id'         => '[0-9]+'
));

or maybe this:

Router::connect('/fj_employers/editSecurityDetail/:id', array(
    'controller' => 'fj_employers',
    'action'     => 'editSecurityDetail',
    'id'         => '[0-9]+'
));
Leo
i don't have problem with url rewrite.My problem is that when server side validation error message is display then url will change /employers/editSecurityDetail/1 to fj_employers/editSecurityDetail/1 Thanks for your respose
Mehul Panchal
Can you post the error and the .htaccess file at / level?
Leo