Ajax 在.htaccess中重写url后的搜索下拉列表结果

Ajax 在.htaccess中重写url后的搜索下拉列表结果,ajax,.htaccess,search,Ajax,.htaccess,Search,在.htaccess中重写url后,我在ajax的搜索结果中遇到了问题 当url是 http://www.sitename.com/movie.php?name=gold 但现在在.htaccess中重写url后,它出现了一些错误 http://www.sitename.com/movie/gold 代码 .htaccess RewriteEngine On RewriteRule ^([^/.]+)$ $1.php [L] # url movie rewrite RewriteCond

在.htaccess中重写url后,我在ajax的搜索结果中遇到了问题 当url是

http://www.sitename.com/movie.php?name=gold
但现在在.htaccess中重写url后,它出现了一些错误

http://www.sitename.com/movie/gold
代码 .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();
   });
 });

有什么问题吗?请检查标题中的搜索栏,在这个中工作正常,在这个中不工作