Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • how to remove action name from URL in cakephp

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 232
    Comment on it

    Current URL is : http://mysite.com/MyController/view/page1

    but if you want something like :http://mysite.com/MyController/page1

    means you want to hide action name from URL.

    Then go to app/config/routes.php and type the below code.

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

    It will help you

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: