Skip to content

Instantly share code, notes, and snippets.

@kemo
Created March 30, 2012 14:46
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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)$
@Maqsim
Copy link

Maqsim commented Aug 15, 2013

Very nice, dude!

@micron
Copy link

micron commented Aug 19, 2014

Thanks for sharing

@JohnnySk
Copy link

Nice, thank you =)

@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