Welcome Guest, Not a member yet? Register   Sign In
URL Format
#1

[eluser]GeXus[/eluser]
Hello, I have a basic e-commerce setup like this with a controller product.php, this gives me the following URL:

http://www.domain.com/product

To view a specific product, I now have:

http://www.domain.com/product/view/id

With a function within product.php called view. Is it possible to eliminate that? so the URL could just be http://www.domain.com/product/id ?

Thank you!
#2

[eluser]WanWizard[/eluser]
you can use the _remap() method to capture all calls to the product controller (see the user guide).

Alternatively you can use a route that converts http://www.domain.com/product/id to http://www.domain.com/product/view/id, so you can leave your controller code as-is.
#3

[eluser]GeXus[/eluser]
Awesome! The routes worked perfect, thank you! Smile




Theme © iAndrew 2016 - Forum software by © MyBB