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

#1
[eluser]Guiseppi[/eluser]
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

Help!

#2
[eluser]micflan[/eluser]
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.
Code:
a2enmod rewrite

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

#3
[eluser]Guiseppi[/eluser]
Yes your command results in: "rewrite" already present

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

#4
[eluser]wh1tel1te[/eluser]
Could you please post your .htaccess contents?

#5
[eluser]Guiseppi[/eluser]
This .htaccess is sitting in the root folder of my site:

Code:
<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  
      
</IfModule>

#6
[eluser]wh1tel1te[/eluser]
Your line here:
Code:
RewriteRule ^(.*)$ index.php?/$1 [L]

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

#7
[eluser]Guiseppi[/eluser]
I made the adjustment you suggested, restarted apache & still no go... Sad

#8
[eluser]wh1tel1te[/eluser]
Apache doesn't need to be restarted for .htaccess changes.

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

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

#9
[eluser]Guiseppi[/eluser]
Made that adjustment as well, didn't fix it.

Thx for responding though!

#10
[eluser]toopay[/eluser]
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.