Skip to content

Instantly share code, notes, and snippets.

@kemo
Created March 30, 2012 14:46
Show Gist options
  • Save kemo/2252034 to your computer and use it in GitHub Desktop.
Save kemo/2252034 to your computer and use it in GitHub Desktop.
Detect AJAX with .htaccess rewrite rule (mod_rewrite test)
RewriteCond %{HTTP:X-Requested-With} !=XMLHttpRequest
RewriteCond %{HTTP:X-REQUESTED-WITH} !^(XMLHttpRequest)$
@fischermatte
Copy link

thx

@ckhandla94
Copy link

Thanks it is working

@irvanhilmi27
Copy link

irvanhilmi27 commented Mar 11, 2018

thanks, it's working fine.

@gustavosb8
Copy link

It worked perfectly. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment