Created
October 29, 2013 11:30
-
-
Save novasky-zz/7213002 to your computer and use it in GitHub Desktop.
Dynamic subdomains with cPanel and PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put * in Subdomains in cPanel to setup Wildcard | |
# Put this in .htaccess | |
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteRule ^([aA-zZ])$ subslug.php?username=$1 | |
RewriteCond %{HTTP_HOST} ^(^.*)\.yourdomain.com | |
RewriteRule (.*) subslug.php?username=%1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment