Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $blockedQueries = ["query1", "query2"];
- if (in_array($query, $blockedQueries)) {
- if (is_ajax()) {
- return json(['redirect' => url_for('site.home')]);
- }
- return redirect_to('site.home');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement