Created
July 17, 2013 18:27
-
-
Save ursuleacv/6023125 to your computer and use it in GitHub Desktop.
How to let PHP to create subdomain automatically for each user?
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
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteRule ^([aA-zZ])$ dostuff.php?username=$1 | |
The rewrite rule for grabbing the subdomain would look like this: | |
RewriteCond %{HTTP_HOST} ^(^.*)\.mywebsite.com | |
RewriteRule (.*) dostuff.php?username=%1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment