Welcome Guest, Not a member yet? Register   Sign In
URL Routing Issues
#1

[eluser]RyanH[/eluser]
I'm having an issue getting "index.php" to load. If you go to mysite.com/dir/, you get the standard server produced 404 error. If you go to mysite.com/dir/index.php you get the CI 404 error. I have looked through the User Guide, viewed the video tutorials and searched the forums as much as possible in an effort to find a solution to this. Everything I have tried thus far has not worked. CI is set up like this: mysite.com/dir/CI_dir/.

I'm fairly sure I've installed CI correctly, seeing as how you simply upload the files and then modify the required files to match your settings. For the time being I'm using the standard blog controller example, and routes.php is setup to recognize this file. I do have the Blog() function with the parent::Controller statement in there.

I am using Dreamhost for my webhost and running PHP 5. I do not have an .htaccess file though I'm unsure if I need it because, if I understood correctly, this just gets rid of the index.php extension for cleaner, more friendly URL's.

Any suggestions would be appreciated. Thanks.
#2

[eluser]Liothen[/eluser]
i had a similar issue with mine on lunarpages hosting. I corrected it by forceing it to the base.
here is an example of the one i use, hopefully it will for you too Tongue


Code:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule !\.(.*) /index.php
RewriteCond $1 !^(index\.php|robots\.txt|design|user_guide|images|xhtml1-transitonal\.dtd|xhtml11\.dtd)
RewriteRule ^(.*)$ /index.php/$1 [L]
#3

[eluser]RyanH[/eluser]
Thanks. Unfortunately that didn't do much. However now it at least shows the CI 404 error when I load mysite.com/dir/CI_dir/ instead of the server 404 error. Any other suggestions? Thanks.
#4

[eluser]Liothen[/eluser]
under /system/application/config/routes.php
what does your $route['default_controller'] say its set too?
#5

[eluser]RyanH[/eluser]
It's set to the default example, "blog".
#6

[eluser]RyanH[/eluser]
As an update to this, now I can't even get mysite.com/dir/CI_dir/blog/ to load. If anybody has any suggestions I would appreciate it. It's difficult to learn CI when I can't even get the pages to load properly as well as somewhat frustrating. Thanks.
#7

[eluser]sukar[/eluser]
Check this one: http://www.ellislab.com/codeigniter/user...oting.html
it says you should change $config['index_page'] = "index.php"; to this
$config['index_page'] = "index.php?"; the difference is the addition of "?".
#8

[eluser]Liothen[/eluser]
Just by the off-chance when you say CI_dir do you mean http://example/dir/system/blog/ or http://example/dir/dir/blog/?
whereas system is the "system" folder in the CI default.
#9

[eluser]RyanH[/eluser]
[quote author="marcz" date="1186008959"]Check this one: http://www.ellislab.com/codeigniter/user...oting.html
it says you should change $config['index_page'] = "index.php"; to this
$config['index_page'] = "index.php?"; the difference is the addition of "?".[/quote]Thanks, that fixed the secondary problem of nothing showing up, now it's back to the CI 404 error.

[quote author="Liothen" date="1186008959"]Just by the off-chance when you say CI_dir do you mean http://example/dir/system/blog/ or http://example/dir/dir/blog/?
whereas system is the “system” folder in the CI default.[/quote]The URL structure goes like this: http://www.mysite.com/dir/CI_dir/index.php/blog - I hope that makes a little more sense.
#10

[eluser]RyanH[/eluser]
I've changed the directory to mysite.com/CI_dir/ and it's still not working. This has been an on going issue for several days now and I didn't think it would be this hard to solve. It's somewhat frustrating. I've searched the forums, read through the wiki and still nothing is working. If anyone has any advice I would appreciate it. Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB