• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'welcome' not showing up as expected

I did a fresh upload to a folder on my domain, mydomain.com/test

However, when I go to mydomain.com/test, I get the CI 404. when I go to mydomain.com/test/welcome, i get the proper welcome page that comes with CI

for my .htaccess, I have this code:
Options -indexes
DirectoryIndex index.php
RewriteEngine On
RewriteBase /test/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]

$config['base_url'] = "http://mysite.com/test/";

$route['default_controller'] = "welcome";

Everything else is pretty much default...

When I go to mysite.com/test, am I supposed to see Welcome first? or is everything set up properly if I go to mysite.com/test/welcome ?

bump. still not sure what's goin on Sad

[eluser]Randy Casburn[/eluser]
Hi, Try a slash after the ? after index.php thus:



No, still not seeing the welcome page. I'm only trying to get it so that I type in mysite.com/test and the welcome page shows up. I'm confused about why I have to type in mysite.com/test/welcome (which works) but I've told CI to automatically bring in 'welcome' as the main page...and yet, I get a CI 404 if I don't type anything after test/

[eluser]Randy Casburn[/eluser]
This has to do with:

the differences between your HTTP server platforms in the two locations


| This item determines which server global should be used to retrieve the
| URI string. The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
| 'AUTO' Default - auto detects
$config['uri_protocol'] = "AUTO";


Quote:RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) index.php/$1 [L]

You've got to discover the differences and work only on the differences. Otherwise you're stabbing in the dark.


My apologies, I'm not sure what the next step is ... :blank:

You could test an other htaccess:
<IfModule mod_rewrite.c>
    # Turn on the Rewrite Engine
    RewriteEngine On
    # If the file or directory exists, show it
    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]

It works on the most servers I had a CI project.
I didn't have to define a RewriteBase even if the project was
placed in a subfolder. I'm no htaccess pro but you could
give it a try ..

[eluser]Randy Casburn[/eluser]
@Nate - are the setttings I highlighted above EXACTLY the same on both the hosted server and your localhost?

That's where you start. Look at the config.php, look at the htaccess file, look at the http.conf file for apache and compare all the settings.

You have to find the differences between the two servers.

Come back and report the differences. If software works in one spot and not in another, you have to determine the differences between the two spots. It's pretty straight forward.

The other option, as LuckyFella73 has offered, is to start stabbing in the dark at all these files until you completely screw everything up and get even more frustrated.

Those are you options and starting places.


Also, make sure you have mod_rewrite installed/enabled on your server. You can check this by creating a &lt;?php phpinfo() ?&gt; page and looking under the section apache2handler in the loaded modules section.

You can also try this in the .htaccess file located on your server's root directory:

RewriteEngine On

RewriteCond $1 !^(index\.php|images|robots\.txt|css|sitemap\.xml)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

php_flag register_globals on

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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