12-04-2014, 09:22 PM
Hi All,
I was hoping to get some clarification about routing. I was under the impression that the only pages you could access were ones that were setup in the routes.php file. Example:
URL: abc.com
Route entry: $route['hello'] = 'example/hi';
As expected, I can access the page at abc.com/hello.
Now, if i comment out that line in the code:
//$route['hello'] = 'example/hi';
I get a 404 if i try accessing abc.com/hello (which again, I expect). What I find peculiar though is that if I enter abc.com/example/hi in my browser, I can access the content. I didn't know that such a thing was possible. Could someone offer me some insight (even if it's just as simple as yes... it is possible)?
Not sure if it makes a difference but here is my .htaccess file:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Thanks.
I was hoping to get some clarification about routing. I was under the impression that the only pages you could access were ones that were setup in the routes.php file. Example:
URL: abc.com
Route entry: $route['hello'] = 'example/hi';
As expected, I can access the page at abc.com/hello.
Now, if i comment out that line in the code:
//$route['hello'] = 'example/hi';
I get a 404 if i try accessing abc.com/hello (which again, I expect). What I find peculiar though is that if I enter abc.com/example/hi in my browser, I can access the content. I didn't know that such a thing was possible. Could someone offer me some insight (even if it's just as simple as yes... it is possible)?
Not sure if it makes a difference but here is my .htaccess file:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Thanks.