Skip to:
Content
Pages
Categories
Search
Top
Bottom

Username as subdomain

  • @thelandman

    Participant

    Hey, is it possible to have usernames as a subdomain.

    Basically I’d like to be able to have something like this username.websitename.com?

    I know that I’d have to go about using modrewrite. I’ve tried and had no success.

Viewing 11 replies - 1 through 11 (of 11 total)
  • @mercime

    Participant

    @thelandman – username.websitename.com certainly.
    Did you check this out – https://codex.wordpress.org/Create_A_Network#Step_2:_Setting_Wildcard_Subdomains

    @thelandman

    Participant

    Can anyone gimme feedback on this please? Would be greatly appreciated.

    @boonebgorges

    Keymaster

    Do you mean that you want username.websitename.com to point to the user profile?

    That’s easy enough if all you want is a redirect from username.websitename.com to websitename.com/members/username – you can do this with a straightforward RewriteRule in .htaccess. If you want to keep username.websitename.com for the entire session (so links like username.websitename.com/profile, username.websitename.com/friends, etc persist in the address bar), it’ll be pretty complicated. It’d mean reconfiguring a pretty big chunk of bp-core/bp-core-catchuri.php and/or bp-core.php to make sure that the $bp global is set correctly, as well as some .htaccess rules to make sure that URLs throughout buddypress that point to websitename.com/members/username/x get redirected to the right place.

    @thelandman

    Participant

    @boonebgorges, perfect explanation. Thanks mate!

    @hnla

    Participant

    I don’t get this response?
    Can anyone gimme feedback on this please? Would be greatly appreciated.

    Was that not feedback that mercime gave you? and it seemed to answer your original question quite succinctly; not really sure how we get from subdomain name to redirects pointing to user profiles, you must have amazing prescient sense Boone.

    @boonebgorges

    Keymaster

    @hnla You should know by now that I have Super Powers.

    @hnla

    Participant

    @boonebgorges and from this day forth thou shall be known by the name ‘Divine Oracle’ :)

    @mercime

    Participant

    @hnla, agreed @boonebgorges is “Divine Oracle”, I certainly didn’t see that coming, wow! :-)

    @hnla

    Participant

    😆 think that’s known as ‘Left Field’

    @thelandman

    Participant

    Well if this helps you @hnla from being sarcastic, then I’ll also thank @mercime for their feedback

    @hnla

    Participant

    Not sure where I demonstrated Sarcasm? But don’t thank mercime in order to help me do it because… well it’s simply courteous? )

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Username as subdomain’ is closed to new replies.
Skip to toolbar