Welcome Guest, Not a member yet? Register   Sign In
Codeigniter and htaccess mod_rewrite
#8

[eluser]chris1986m[/eluser]
Hi,

sooo i test it and have to say that i'm to stupid for this....

Codeigniter is installed into follow root direction:
www.test.com/testsystem/preview/

Application
www.test.com/testsystem/preview/application

CSS
www.test.com/testsystem/preview/css/main.css

JS
www.test.com/testsystem/preview/js/main.js

htaccess in root
www.test.com/testsystem/preview/.htaccess

index.php in root
www.test.com/testsystem/preview/index.php

view (my complete one page html5 design frontend)
www.test.com/testsystem/preview/application/views/index.php


Is it possible to put the css and js files in the application or is the root directory the best solution?

Please check my configs, maybe there is a mistake...

Code:
$config['base_url'] = 'www.test.com/testsystem/preview/';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
$config['language'] = 'de';

Code:
$route['default_controller'] = 'start';

Code:
$autoload['libraries'] = array('session');
$autoload['helper'] = array();
$autoload['language'] = array();

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Start extends CI_Controller {
public function index() {
  $this->load->helper('language');
  $this->lang->load('main', $this->session->userdata('language'));
  
  if (!$this->session->userdata('language'))
   $this->session->set_userdata('language','de');
  
  $this->load->view('index');
}

public function languageSwitch() {
  $this->load->helper('url');
  $this->session->set_userdata('language',$this->uri->segment(3));
  redirect('http://www.start.com/testsystem/preview/index.php?/start/','location');
}
}

The language switch are only two buttons with follow href:

Code:
href="http://www.start.com/testsystem/preview/index.php?/indexController/languageSwitch/de"
href="http://www.start.com/testsystem/preview/index.php?/indexController/languageSwitch/en"

That was all. But why i have to say index.php? and not index.php.

Thanks for all your help!
Greets


Messages In This Thread
Codeigniter and htaccess mod_rewrite - by El Forum - 10-21-2012, 03:56 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 04:48 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 05:35 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 05:59 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 06:02 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 06:10 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-22-2012, 06:24 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-23-2012, 04:26 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-23-2012, 04:57 AM
Codeigniter and htaccess mod_rewrite - by El Forum - 10-23-2012, 10:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB