I’m currently building a web app with Codeigniter. I noticed their documentation favors segmented URLs over query strings which makes sense since they’re so much easier to read and look nicer. I was also browsing threadless.com the other day and really liked the way they formatted their queries:
Normally, a query would look like this:
http://www.threadless.com/catalog/index.php?type=guys&view=25&size=3xl
But Threadless uses this format:
http://www.threadless.com/catalog/type,guys/view,25/size,3xl
How do they get that format? Does it involve the .htaccess? Does that format play nice with Codeigniter or would it involve a custom function?
Thanks!
You can do something similar where you can have.
To do so, you’d have a controller function like:
Which would output something like:
If you want the commas, you’d want to touch .htaccess to rewrite all “,” into “/”.