Skip to content

Instantly share code, notes, and snippets.

@peter-m
Created September 18, 2012 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peter-m/3742412 to your computer and use it in GitHub Desktop.
Save peter-m/3742412 to your computer and use it in GitHub Desktop.
check if a mod is enabled - if so, redirect to google.com
# if mod_xyz is not enabled...
<IfModule !mod_xyz.c>
# ...turn on the rewrite engine... (we suppose it's already enabled)
RewriteEngine On
# ...and redirect to google.com if calling <your_project_root>
RewriteRule ^(.*)$ http://www.google.com/ [R=301]
</IfModule>
# --> if the module is not enabled, you should be redirected to google
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment