WordPress.org

Ready to get started?Download WordPress

Forums

subcategory to subdomain mapping (7 posts)

  1. gulflee
    Member
    Posted 3 years ago #

    In a single install wordpress, not wp-ms
    i m trying to do this subcategory to subdomain mapping, the subdomain structure is with country it would look like this:
    thailand.maindomain.com
    singapore.maindomain.com
    maindomain.com

    in maindomain.com i have category of each country respectively,
    maindomain.com/singapore
    and i would like to know is there a wayto make as below

    maindomain.com/singapore --> singapore.maindomain.com
    maindomain.com/thailand--> thailand.maindomain.com

  2. TCBarrett
    Member
    Posted 3 years ago #

    You could possible set up a wildcard DNS record for *.maindomain.com and then use web server redirects or a WordPress hook to push the visitor onto maindomain.com/$1

  3. gulflee
    Member
    Posted 3 years ago #

    thank you tcbarrett for the reply,
    do the subdomain need to have content to display?
    maindomain.com/singapore --> singapore.maindomain.com
    b;cos i m trying to display content of
    maindomain.com/singapore and the url rewrite show singapore.maindomain.com

  4. digibucc
    Member
    Posted 3 years ago #

    yeah most hosting companies have free subdomains, at least a number of them.

    for example on one site i maintain they have a 'nascar.site.com' , that really just goes to 'site.com/nascar' so once you have it so that the subdomain points to the proper directory on the main domain - you can set up a url redirect via plugin/htaccess if necessary.

  5. gulflee
    Member
    Posted 3 years ago #

    thanks digibucc, the subdomain.maindomain.com had A record pointed to the 2nd server, i m figuring it to show the content at maindomain.com/subdomain

  6. arrentan
    Member
    Posted 3 years ago #

    Gulf, why not you just import and and export your post based on category to your sub blog with WordPress multisite installation?

    It will save up your time for the redirection and gives better SEO result.

  7. gulflee
    Member
    Posted 2 years ago #

    that is an initial ideal but when comes to few 10s of them it is a nightmare to manage them.
    and i m only needing a few like 3~4 OF them in subdomain the rest of the categories will be remain in subdirectory..
    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic