Welcome Guest, Not a member yet? Register   Sign In
subdirectory problem
#1

[eluser]redhorselancer[/eluser]
I have installed CI in my root directory (it worked) and then I made a folder under my root, named it "quiz" and placed a copy of the CI that i installed in my root directory but it doesn't work. I didn't forget to change the base_url to "http://www.myroot.com/quiz/" (not the real url) but does anybody know why it doesn't work and how it can be solved?

by the way, I get a CI generated 404 error when i access http://www.myroot.com/quiz/. is it a routing problem?

please help me solve this problem, thanks.
#2

[eluser]Michael Wales[/eluser]
What do you mean, not the real URL?

If you copied everything over to the new directory, changed the base_url to the proper directory, and then typed that URL into the address bar it should work.

By not changing the real URL, makes it sound like you didn't change it in your address bar - but I know better. Big Grin

Maybe the error your getting is telling you that the conroller you defined to load as default can not be found? Check your routes.cfg and make sure that controller exists in \application\controllers\
#3

[eluser]onejaguar[/eluser]
Did you MOVE CI from root to the /quiz/ directory or COPY it? If you copied it and are using URL rewrites accessing http://www.myroot.com/quiz/ will make the root copy of CI look for a "quiz" controller.
#4

[eluser]redhorselancer[/eluser]
i'm not using mod_rewrite. i found out that the problem is about the uri_protocol in the config file. i "tasted the different flavors" rick was talking about and found out that my server works with the REQUEST_URI option.

well i found the solution also in this forum: if you think your script is working fine in some servers/directories and then suddenly it gives you a 404 error in other servers/directories, try changing the uri_protocol in your config file or if the uri_protocol thing doesn't still work, try changing the index_page value in your config file into "index.php?" (with the question mark).; that info is also found in the troubleshoot part of the CI docs.

thanks CI people
#5

[eluser]Unknown[/eluser]
Although I am newbie I found I was having a similar problem when I moved a working site to a subdirectory. Try changing the uri protocol setting (found ni the config.php) from auto to something else as it may be getting confused. I changed the config value to "uri_protocol" and everything is working great now.




Theme © iAndrew 2016 - Forum software by © MyBB