Skip to content

Instantly share code, notes, and snippets.

@afelicioni
Created January 11, 2016 19:11
Show Gist options
  • Save afelicioni/493c9fbee20fb729f0f0 to your computer and use it in GitHub Desktop.
Save afelicioni/493c9fbee20fb729f0f0 to your computer and use it in GitHub Desktop.
second level domain trick
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
#RewriteCond %{HTTP_HOST} !www.dns.it
#RewriteCond %{HTTP_HOST} (.*).dns.it
#RewriteRule ^(.*)$ %1/$1
RewriteCond %{HTTP_HOST} whois.dns.it
RewriteCond %{REQUEST_URI} !_whois/
RewriteRule ^(.*)$ _whois/$1 [L]
RewriteCond %{HTTP_HOST} tld-info.dns.it
RewriteCond %{REQUEST_URI} !_tld-info/
RewriteRule ^(.*)$ _tld-info/$1 [L]
RewriteCond %{HTTP_HOST} tld.dns.it
RewriteCond %{REQUEST_URI} !_tld-info/
RewriteRule ^(.*)$ _tld-info/$1 [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment