search dropdown results after rewriting url in .htaccess
search dropdown results after rewriting url in .htaccess
i have a problem in search results from ajax after rewriting url in .htaccess
search was working perfect when the url was like
http://www.sitename.com/movie.php?name=gold
but now it has some bug after the url was rewritten in .htaccess
http://www.sitename.com/movie/gold
code
.htaccess
RewriteEngine On
RewriteRule ^([^/.]+)$ $1.php [L]
# url movie rewrite
RewriteCond %THE_REQUEST ^[A-Z]3,s/+movie.php?name=([^s&]+) [NC]
RewriteRule ^ movie/%1? [R=301,L]
RewriteRule ^movie/([^/]+)/?$ movie.php?name=$1 [L,QSA]
search.js
$(document).ready(function()
$('.top-search input[type="text"]').on("keyup input", function()
/* Get input value on change */
var inputVal = $(this).val();
var resultDropdown = $(this).siblings(".result");
if(inputVal.length)
$.get("search.php", term: inputVal).done(function(data)
// Display the returned data in browser
resultDropdown.html(data);
);
else
resultDropdown.empty();
);
// Set search input value on click of result item
$(document).on("click", ".result p", function()
$(this).parents(".top-search").find('input[type="text"]').val($(this).text());
$(this).parent(".result").empty();
);
);
please check the search bar from the header, working perfectly in this jaisentertainment.com not working in this jaisentertainment.com/movie/gold-2018-full-movie
– Jais Entertainment
Aug 21 at 19:04
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
And what is the problem?
– Dave
Aug 21 at 19:03