Hi again I’m trying to implement a backend portion for my application. I followed the cookbook also. but I cant make the url structure work. backend access is supposed to be like this: www.mysite.com/backend/backend.php but it only works as www.mysite.com/backend.php here is the config code and my htacess thanks for your help
backend.php
<?php
return CMap::mergeArray(
require(dirname(__FILE__).'/main.php'),
array(
// Put back-end settings there.
'components' => array(
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'backend'=>'site/index',
'backend/<_c>'=>'<_c>',
'backend/<_c>/<_a>'=>'<_c>/<_a>',
),
),
),
)
);
?>
htaccess
deny from all
AddDefaultCharset utf-8
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule backend.* backend.php
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
backendcontroller.php
<?php
class BackEndController extends CController
{
public $layout='layout_name';
public $menu=array();
public $breadcrumbs=array();
public function filters()
{
return array(
'accessControl',
);
}
public function accessRules()
{
return array(
array('allow',
'users'=>array('*'),
'actions'=>array('login'),
),
array('allow',
'users'=>array('@'),
),
array('deny',
'users'=>array('*'),
),
);
}
}
?>