Welcome Guest, Not a member yet? Register   Sign In
Is it possible that .htaccess mod_rewrite rules are inhibiting CodeIgniter route rules?
#1

[eluser]Dr. Seuss[/eluser]
I'm getting unexpected behavior from CI routing rules. My routes are:

Code:
$route['default_controller'] = "dflt";
$route['404_override'] = "''";

$route["home/(:any)'] "] = "home/home/$3";
$route["home"] = "home/dflt";

Simple enough. I have a controller folder, like:

Quote:(dir) home
home.php
function index
dflt.php
function index
function out

My .htaccess file is an attachment to this post.

When I plug in the "full url", I get the expected result. For instance, when I do:

www.mydomain.com/home/home

I get the output from "index".

When I do:

www.mydomain.com//home/home/out

I get the output from the "out" function.

What I am expecting, however (from the routes file) is to be able to do

www.mydomain.com/home/out

and get the resultthat I am currently getting by "www.mydomain.com//home/home/out".

TL;DR: My routes don't seem to be altering the default behavior of CI at all.

Does my removing the "index.php" via mod_rewrite alter the behavior of the way routes work?


Messages In This Thread
Is it possible that .htaccess mod_rewrite rules are inhibiting CodeIgniter route rules? - by El Forum - 10-02-2011, 08:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB