Welcome Guest, Not a member yet? Register   Sign In
New CI install gives strange 404 errors.
#1

[eluser]Omnisu[/eluser]
With default settings in CI (Except for base_url) navigating to installation_url/ and installation_url/index.php resulted in 404 pages. However, installation_url/index.php/ (Note trailing slash) took me to the welcome page. I followed the tutorial in the documentation through to the creation of the blog controller before I discovered this. installation_url/index.php/blog worked as expected.

I was able to 'fix' installation_url/ and installation_url/index.php by changing $config['uri_protocol'] from AUTO to ORIG_PATH_INFO.

Unfortunately, this broke the index.php/blog path, and I had to switch to query strings (Including adding a ? to my index.php filename as per the troubleshooting section of the documentation). Currently, it works using query strings. But I would really rather use the pretty URLs. The pretty URLs worked, but only when the full path was supplied.

I don't know enough PHP to know what other information I should share. But the installation is at http://www.stafford6-3.com/dev/ , and you can see phpinfo at http://www.stafford6-3.com/dev/index.php?c=phpinfo .
#2

[eluser]Omnisu[/eluser]
I broke it because I can't stop mucking with it. If that phpinfo url doesn't work, try http://www.stafford6-3.com/dev/index.php/phpinfo .
#3

[eluser]Dam1an[/eluser]
I'm able to access the welcome page is I put in the controller name manually, and that works with or without the trailing slash, the php info page also works (with pretty URLs and query strings)
#4

[eluser]Omnisu[/eluser]
Try it now, and you should get the behavior I originally encountered.

Try all of these urls :

http://www.stafford6-3.com/dev/
http://www.stafford6-3.com/dev/index.php
http://www.stafford6-3.com/dev/index.php/
http://www.stafford6-3.com/dev/index.php/welcome
#5

[eluser]Dam1an[/eluser]
404, 404, works, works

You could try creating a .htaccess, forcing it to rewrite it to include index.php/
You could also set URL suffix to '/' in the config file
#6

[eluser]Omnisu[/eluser]
I'm afraid I don't know the first thing about the scripts used in .htaccess files.

The second option appeared to have no effect.
#7

[eluser]Dam1an[/eluser]
[quote author="Omnisu" date="1240623874"]I'm afraid I don't know the first thing about the scripts used in .htaccess files.[/quote]

I don't really know much about htaccess, and never needed to, as the basic "get rid of index.php" is all I've ever needed

Maybe someone else wants to step in now, as I'm running out of ideas
(The only other thing I could think of, is some wierd setting in your hosting environment, but don't know what to look for)
#8

[eluser]Omnisu[/eluser]
I'll reiterate that the current behavior is with $config['uri_protocol'] = "AUTO";
With that set to 'ORIG_PATH_INFO', the first two links will work. However, no URL will load anything but the welcome page.
#9

[eluser]Omnisu[/eluser]
I've solved this problem by renaming my index.php file to something else (and configuring CI with the new filename) and creating a new index.php that does nothing but redirect to that.
#10

[eluser]Dam1an[/eluser]
Now that is very wierd, have you tried if it works by making htaccess rewrite to the new front controller (whatever you're old index.php is)




Theme © iAndrew 2016 - Forum software by © MyBB