Welcome Guest, Not a member yet? Register   Sign In
how can i get url look like that?
#9

[eluser]loosetops[/eluser]
I have created a controller to try and imitate your urls.

Here is the controller
Code:
<?php

class Articles extends Controller {

    function __construct(){
        parent::Controller();

    }
    
    function category($cat=NULL,$id=NULL){
        echo 'cat: ',$cat,', id: ',$id;
    }
}

The URLs for this controller are

Code:
http://site.com/articles/category/press/45

The page output for the above URL is
Quote:cat: press, id: 45

I applied this route
Code:
$route['service:(:any)/(:any):(:any)/ID:(:num)'] = '$1/$2/$3/$4';
I got the desired output.

Another less specific route that worked is
Code:
$route['service:(:any)/(:any):(:any)/:any:(:num)'] = '$1/$2/$3/$4';

Make sure the first letter capitalization for "service" is correct. Other than that I don't see why the routes aren't working for you. If you can access the controller method using the original URL, a correct route should not take you to a 403 page.


Messages In This Thread
how can i get url look like that? - by El Forum - 03-11-2010, 04:43 PM
how can i get url look like that? - by El Forum - 03-11-2010, 05:30 PM
how can i get url look like that? - by El Forum - 03-12-2010, 12:22 PM
how can i get url look like that? - by El Forum - 03-12-2010, 05:33 PM
how can i get url look like that? - by El Forum - 03-12-2010, 11:11 PM
how can i get url look like that? - by El Forum - 03-13-2010, 12:04 AM
how can i get url look like that? - by El Forum - 03-13-2010, 05:36 AM
how can i get url look like that? - by El Forum - 03-13-2010, 03:40 PM
how can i get url look like that? - by El Forum - 03-13-2010, 04:28 PM
how can i get url look like that? - by El Forum - 03-13-2010, 05:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB