Welcome Guest, Not a member yet? Register   Sign In
Some help..

Remove the url suffix and you should be able to reach http://www.site.com/lists/1. I'm not sure if you use the url suffix configuration is removed before the url is routed so you could try
$route['/([a-z]+)/(\d+)\.html'] = "main/$1/$2";

Wait so why not have make it so each static page has its own controller, instead of each static page having a method in a controller?

http://localhost/site/lists.html 404 Page Not Found

Because this is the single method find by me to not showing controller in URL. I want static pages to not show controller..

Right well I just built the system you described on my server using the following routes:
$route['default_controller'] = "main";
$route['scaffolding_trigger'] = "";

$route['lists/(\d+)'] = 'main/lists/$1'

And it works, btw you don't put the .html into the regex

I confirmed it the url suffix is removed before the routes are parsed so the suffix doesn't matter
The http://localhost/site/lists.html example doesn't work because it's not in the routes configuration, you need to add
$route['/([a-z]+)'] = "main/$1";
for that url to be routed.

edit: @adamp1 i wasn't sure so it could have been the problem, but it isn't Smile

Still doesn`t work :| I`ve trying both examples and nothing.. same 404

First i want to make sure: http://localhost/site/ is your base url, right?

edit : i made a newbie mistake, again, the slash at the beginning of the route
$route['([a-z]+)'] = 'main/$1';

Yer, Im never sure with damn regex and routing, that's why I had to go and build it to see myself.

Wait a sec, are you making the call to index.php???

you should be accessing

You can only miss the index.php out of you have url re-writing in an .htaccess file

Theme © iAndrew 2016 - Forum software by © MyBB