Forum Moderators: phranque
I'd appreciate any advice on this :)
We're using wildcard DNS on a site and I'm wanting to redirect like so:
fred.site.com
to display the page:
[site.com...]
The username in the above example, "fred", isn't something we'll have control over - the user will select that when they sign up.
Thanks in advance!
valid HTTP subdomain strings,
valid HTTP URL-strings, and
valid *nix filepath strings.
I strongly suggest that you accept *only* username strings containing lowercase letters, numbers, and hyphens, and further, that the username must start with a letter and end with a letter or a number. That will keep you out of trouble with the various protocol and filesystem requirements.
You can code the mod_rewrite accordingly, but the new-user sign-up script must enforce the "rules" above, so as not to allow creation of accounts that cannot be accessed.
Jim
[edited by: jdMorgan at 2:19 am (utc) on July 17, 2007]