Home » , , » Create two different url for admin and front site in cakephp

Create two different url for admin and front site in cakephp

Written By Unknown on Jumat, 06 September 2013 | 22.28

Most easy way to do this is by the use of scaffold variable.

Open the controller for which you want to make different admin page
and add the following statement:

public $scaffold='admin';

Now to go to app /config/core.php
and add the following statement:

Configure::write('Routing.prefixes', array('admin'));

Now create function for admin in controller like
public function admin_index(){
   
}


Now you access your admin using http://www.domain.com/admin/controller_name
and site using http://www.domain.com/controller_name
Share this article :

Posting Komentar

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Kumpulan Kata Broadcast Blackberry - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger