Welcome Guest, Not a member yet? Register   Sign In
mapping routes
#2

[eluser]paulcj2[/eluser]
I tried
Code:
$route['page/([a-z]+)/(:num)'] = "page/index/$1/$2";
,
and the url
Code:
http://clickbasicsdemo.com/page/clickbasicsdemo/437
but it does not work on controller:
Code:
class Page extends Controller {

    function index($site_address, $art_id)
    {
        echo '<p>Site address: '.$site_address.'</p>';
        echo '<p>Article id: '.$art_id.'</p>';
    } //function
    
} //class
This url, however, does work:
Code:
http://localhost/clickbasicsdemo/index.php/page/clickbasicsdemo/437
How can I get it to work without index.php in the url?


Messages In This Thread
mapping routes - by El Forum - 09-23-2008, 05:06 PM
mapping routes - by El Forum - 09-24-2008, 06:04 PM
mapping routes - by El Forum - 09-24-2008, 07:12 PM
mapping routes - by El Forum - 09-24-2008, 08:19 PM
mapping routes - by El Forum - 09-24-2008, 08:54 PM
mapping routes - by El Forum - 09-24-2008, 09:15 PM
mapping routes - by El Forum - 09-25-2008, 06:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB