Yet another URI issue |
[eluser]Geoffrey[/eluser]
I've been looking at CI for a couple of days now and the potential looks great. My problem is that I've tried to follow the documentation, wiki and various suggestions on the forum but I'm still getting Apache2 404 errors from some of my URIs. Using the default CI (1.6.3) I've added a second function called test2 to the welcome.php file. I also have the following in a .htaccess file Code: RewriteEngine on and in my routes.php file Code: $route['default_controller'] = "welcome"; The uri_protocol is set to AUTO, the index_page is empty and the base_url is correct. I've found I can only access the test2 function by including index.php in the url. http://127.0.0.1/~geoffrey/test/index.php/test2 http://127.0.0.1/~geoffrey/test/index.php/welcome/test2 both work but... http://127.0.0.1/~geoffrey/test/test2 http://127.0.0.1/~geoffrey/test/welcome/test2 both return apache 404 errors.
[eluser]Adam Griffiths[/eluser]
Both will return 404 errors because Apache thinks you are accessing folders, not a URI in CodeIgniter. Try adding something like this in the .htaccess file. Code: RewriteEngine on I doubt that will work because I haven't tested it, but I'm sure you can tweak it to work.
[eluser]Geoffrey[/eluser]
Well as I have access to the httpd.conf file, I deleted .htaccess and used the following alias Code: Alias /CI/ /Library/WebServer/Documents/CI/index.php/ Should've tried the easy option first I guess. |
Welcome Guest, Not a member yet? Register Sign In |