• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie Error, migrating site & anything other than default controller won't fire

I have an existing site which I've moved to the AWS hosting platform.

When I hit: www.example.com my default controller shows up (as expected)

However, when I try to navigate to another controller (say: www.example.com/somecontroller) from that default page I get a 404 error.

Also, based on notes I've seen on the message board I've tried:
www.example.com/index.php/somecontroller brings up the default controller & not /somecontroller

Any ideas what this newbie has overlooked, is there something in the Apache2 config I missed?

Things I've tried:
- I've already tried the general recommendations with adjusting .htaccess to no avail.
- I've already set my base_url in config.php


Are you sure that apache mod_rewrite is enabled?

On a Linux machine this (in a terminal) will either enable the mod or tell you its already running.
a2enmod rewrite

Are you seeing a CodeIgniter 404 page or a generic Apache 404 message?

Yes your command results in: "rewrite" already present

I'm seeing the apache2 404 page (not the CI 404 page)

Could you please post your .htaccess contents?

This .htaccess is sitting in the root folder of my site:

<IfModule mod_rewrite.c>
        RewriteEngine On
         #RewriteBase /
        # If the file or directory exists, show it
         #RewriteCond %{REQUEST_URI} ^system.*
         #RewriteRule ^(.*)$ /index.php?/$1 [L]
        #RewriteCond %{REQUEST_FILENAME} -f [OR]
        #RewriteCond %{REQUEST_FILENAME} -d
        #RewriteRule ^(.+) - [PT,L]

        # Blank queries get sent to the index
        #RewriteRule ^$ index.php [L]

        # All other queries get sent to the index as index.php/whatever
        # RewriteRule ^(.*)$ index.php/$1 [L]
        #RewriteCond $1 !^(index\.php|images|robots\.txt|js|css|user_guide)
        #RewriteRule ^(.*)$ /index.php/$1 [L]
         #RewriteCond %{REQUEST_URI} ^application.*

        RewriteCond $1 !^(index\.php|includes|robots\.txt|fonts)
        RewriteRule ^(.*)$ index.php?/$1 [L]

         #RewriteCond %{REQUEST_FILENAME} !-f
         #RewriteCond %{REQUEST_FILENAME} !-d  

Your line here:
RewriteRule ^(.*)$ index.php?/$1 [L]

You could try changing to this (which works for me):
RewriteRule ^(.*)$ index.php [L]

I made the adjustment you suggested, restarted apache & still no go... Sad

Apache doesn't need to be restarted for .htaccess changes.

Found another line in my code after RewriteEngine On:
Options +FollowSymLinks

Other than that I don't know sorry. Maybe someone else can help.

Made that adjustment as well, didn't fix it.

Thx for responding though!

More information...such as :

1. CI version which you use.
2. Your configuration, 'config.php' under 'application/config'

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.