Welcome Guest, Not a member yet? Register   Sign In
Routes not rewriting links properly
#9

[eluser]steeped[/eluser]
[quote author="jvicab" date="1313178608"]don't worry, all of us most of the time get confused coding, that ios why we come to this forum for help right?
I am not a guru in CI but I do like to help as much as I can, so to get items in the url should not be dificult, as I told you before, but putting only toshiba is another thing, because how CI will know it? I am assuming you may have toshiba123, 124, and more, right? the only way is to define (:any) for it but it will rewrite toshiba for any parameter, which probably is not a good idea. maybe a good solution is to put in the url items, followed by the notebook parameter and hide the third which is the model, right?[/quote]

toshiba123 was only an example. The structure is index.php/electonics/notebook/anyItem. If course anyItem can be anything, and for an example I jusg randomly chose toshiba123.

That works, and when the user goes to index.php/electonics/notebook/anyItem, the page loads properly.

But the URL is really large and I would like it to be smaller, so I beleive I need to use routes. I just don't know how to properly structure it so instead of having to type that long index.php/electonics/notebook/anyItem URL, you would just have to type index.php/item/anyItem. And I'll be getting rid of the index.php at a later time - I can do that with .htaccess.

Thanks for your help. If you would like, I can PM you the working site so you can see how its set up.


Messages In This Thread
Routes not rewriting links properly - by El Forum - 08-12-2011, 07:15 AM
Routes not rewriting links properly - by El Forum - 08-12-2011, 07:55 AM
Routes not rewriting links properly - by El Forum - 08-12-2011, 08:05 AM
Routes not rewriting links properly - by El Forum - 08-12-2011, 08:11 AM
Routes not rewriting links properly - by El Forum - 08-12-2011, 08:17 AM
Routes not rewriting links properly - by El Forum - 08-12-2011, 08:30 AM
Routes not rewriting links properly - by El Forum - 08-12-2011, 08:33 AM
Routes not rewriting links properly - by El Forum - 08-12-2011, 08:50 AM
Routes not rewriting links properly - by El Forum - 08-12-2011, 09:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB