Welcome Guest, Not a member yet? Register   Sign In
Help with a url
#1

[eluser]rabidmacine9[/eluser]
I just uploaded my first CI website and I'm trying to create a proper Url right now the home page is displayed here http://tokoritsi.com/toKoritsi but I would like it to be displayed here: http://tokoritsi.com/ the name of my controller is "ToKoritsi"....

my file structure is like that:

Code:
public_html
      application
      system
      .htaccess
      index.php
.......etc

in my routes.php I have set $routes['default_controller'] = 'toKoritsi';

also in my .htaccess I have this code....

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

in my config.php settings are:
Code:
$config['base_url']    = "http://www.tokoritsi.com/";
$config['index_page'] = "";


can somebody help me remove the controller from the Url(at least from my Home page)?
can I do something like that maybe
Code:
$route[''] = 'toKoritsi';
(wildcards that doesn't seem to work...)

thanks in advance for any help
#2

[eluser]WanWizard[/eluser]
Set the default controller to 'tokritsi'. When no route match is found, the default controller is loaded.

May I also advise against using capitals in controller names to avoid the problem of 404 errors when users use different case in the URL?
#3

[eluser]rabidmacine9[/eluser]
Actually it was your advice that saved my night...
'capitals seem to cause a problem in my server so I replaced the with lowcase...that problem didn't exist on XAMPP and that made it even more difficult to imagine....
anyway thanks a lot!




Theme © iAndrew 2016 - Forum software by © MyBB