I am using jquery to send the data to another page. But the url is not look good, so I want to make it as SEO friendly URL.
Below is my script:
function set_item(item) {
// change input value
$('#searchitem').val(item);
// hide proposition list
$('#search_list_id').hide();
var location = $('#search_location').val().split(',');
var search_term = $('#searchitem').val();
var query =encodeURIComponent(search_term);
if(search_term != '' && location !=''){
window.location.href = 'search.php?location=' + location[0] + '&search_term='+ query;
}
}
Now my url is showing like:
http://www.zesteve.com/search.php?location=Hyderabad&search_term=Traditions%20Events%20Management%20%26%20Marketing%20Pvt%20Ltd
But i want to like below:
http://www.zesteve.com/search/Hyderabad/Traditions-Events-Management-&-Marketing-Pvt-Ltd
I have no idea do I required to use .htaccess
or any additional jquery?