Search code examples
php.htaccesscodeigniterroutesweb-hosting

CodeIgniter not routing on server


this is the first application that I upload to an online server. I created the application on CodeIgniter 3.0.1 and uploaded it to the 000webhost.com . But the problem is, none of my links are being routed. I have checked online and my .htacess file seems to be correct. I have checked this question My .htaccess file is not working and I have the same problem as He does, but the correct answer didnt work.

Heres my .htacess file

DirectoryIndex index.php

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|public|images|css|js|robots\.txt)

RewriteRule ^(.*)$ index.php?/$1 [L]

Solution

    1. Can you make sure you have created that particular "controller" & it's "method" to which you are trying to route? I mean can you literally verify their spellings?

    2. Can you also try to create a rule:

    $route['club'] = 'welcome/index';

    Can you see if the above rule works or not? Do you have any other controller by the name of 'club.php'?