Search code examples
searchurlsef

How can I make clean search urls?


If I have search that has a lot of different options, then url becomes very long and looks very bad. Is there anyway to make urls look better? Using POST to make search would keep urls clean, but people couldn't share search urls.


Solution

  • You can encode all of your search criteria into something like a hash and then have a single parameter in your querystring that has that value:

    http://www.mysearch.com/query=2esd32d2csg3fasfdlkjSDDFdskjsEWFsDFFR39fdf
    

    I'm not sure exactly how you'd encode everything, but it wouldn't be too difficult.