[eluser]diego.greyrobot[/eluser]
Here's the code form the my default 'home' controller:
Code:
<?php
class Home extends Controller {
function Home() {
parent::Controller();
session_start();
$this->load->model('content_model');
$this->load->model('admin_model');
}
function index() {
$data['view_data']['top_white_box'] = $this->content_model->get_content('home_page', 'top_white_box');
$data['view_data']['middle_white_box'] = $this->content_model->get_content('home_page', 'middle_white_box');
$data['view_data']['top_black_box'] = $this->content_model->get_content('home_page', 'top_black_box');
$this->load_view('home_view', $data);
}
function about() {
$data['view_data']['about'] = $this->content_model->get_content('about_page', 'top_white_box');
$data['view_data']['site_links_data']['links'] = $this->admin_model->get_banners(true, true);
$this->load_view('about_view', $data);
}
function contact() {
$data['view_data']['contact'] = $this->content_model->get_content('contact_page', 'top_white_box');
$this->load_view('contact_view', $data);
}
function load_view($page, $vdata) {
$data['head_data']['keywords'] = $this->products_model->get_keywords();
$data['head_data']['description'] = "Buy Corals at Donavon's Reef";
$data['head_data']['title'] = ucfirst(str_replace('_view', '', $page))." Donavon's Reef";
$data['head_data']['head_items'] = array();
//append view data to data
if($vdata) $data += $vdata;
$data['view'] = $page;
//echo "<pre>"; print_r($data); die();
$this->load->view('main_view', $data);
}
}
/* End of file home.php */
/* Location: ./controllers/home.php */
I'm pretty sure mod rewrite is enabled on this server or else the site would only work if I type in index.php at the end right? also 301 redirects work fine when redirect from non-www urls.
this is what my htacess file looks like:
Code:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|swf|xml|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
RewriteCond %{HTTP_HOST} ^donavonsreef.com
RewriteRule (.*) http://www.donavonsreef.com/$1 [R=301,L]
and here's part of my config.php file:
Code:
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
*/
$config['base_url'] = "http://www.donavonsreef.com/";
/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = "";
what else can i try?