Skip to content

Instantly share code, notes, and snippets.

@Ginnw2
Created January 10, 2019 13:48
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 Ginnw2/32a0fe8966507d0b9966ead4605cfb78 to your computer and use it in GitHub Desktop.
Save Ginnw2/32a0fe8966507d0b9966ead4605cfb78 to your computer and use it in GitHub Desktop.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} robots.txt$ [NC]
RewriteRule ^([^/]+) $1 [L]
RewriteCond %{HTTP_HOST} ^site\.com
RewriteRule ^(.*)$ http://site.org/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.site\.com
RewriteRule ^(.*)$ http://site.org/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment