Advertisement
MirazMac

Untitled

Jun 13th, 2021
702
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1.  
  2.         $blockedQueries = ["query1", "query2"];
  3.  
  4.         if (in_array($query, $blockedQueries)) {
  5.             if (is_ajax()) {
  6.                 return json(['redirect' => url_for('site.home')]);
  7.             }
  8.  
  9.             return redirect_to('site.home');
  10.         }
  11.  
  12.  
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement