Welcome Guest, Not a member yet? Register   Sign In
CI Newbie - localhost + URL issues

hope someone can help or guide me in the right direction. I am pretty new to CI Framework have started a contract job on a website that is developed in CI. I have all the code on my Mac and have everything up and running - I can see the homepage of he website on my local machine but cannot view any other URL of the website.

For example this url brings me to the homepage:


And this URL should bring me to a static privacy.php page but all i get is 404 Error (The requested URL /index.php was not found on this server.)


The privacy.php file is in the folder views/static/privacy.php and has a staticpage.php controller also

I have downloaded the code from the production server and everything works fine on live site...Prob something really simple so hope someone can send me in the right direction

Hi all, I'm having this exact same issue but the above solution didn't work... my index page on local works, but all other pages give me the 404. Everything on live server is working. On local, I have a vhosts.conf file with the following:

Alias /<myproject> /Server/sites/<myproject>/web/content

<Directory "/Server/sites/<myproject>/web/content">
Options Indexes FollowSymLinks

AllowOverride All

Order allow,deny
Allow from all

and my .htaccess is the following:

Options +FollowSymLinks

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^(.*)$ /index.php/$1

If I print my $config['base_url'] value it is the following:


Any help is greatly appreciated!

Why don't you guys just set up a virtual server for each project so you don't need to include the "subdirectory" that CI is installed in? It avoids all of these problems and when you move your project, you only have to update one config item (base_url) instead of config, htaccess, html templates, etc. Sure makes things simple. You just make the document_root whatever directory you have CI installed in (subdirectory).

Theme © iAndrew 2016 - Forum software by © MyBB