The MU forums have moved to WordPress.org

Possible to do parked domains also? (16 posts)

  1. peiqinglong
    Member
    Posted 17 years ago #

    This thread is kinda what I want to do, but not quite (http://mu.wordpress.org/forums/topic.php?id=3275&replies=31)

    So I have registered the same names mywebsite.com and mywebsite.org. Mywebsite.org is where the wordpress mu is installed. I'm using the subdomains options (site.mywebsite.org). I was wondering if this was possible:

    when someone goes to mywebsite.com it resolves to mywebsite.org and if someone goes to site.mywebsite.com it goes to site.mysite.org?

    I currently have mywebsite.com parked on top of mywebsite.org and whenever someone access mywebsite.com, it goes to the new blog creation saying that mywebsite.mywebsite.org doesn't exist. Thanks!

  2. drmike
    Member
    Posted 17 years ago #

    That's actually what's known as a Server Alias. Here's a thread on the subject fron the Direct Admin forums that should give you an idea on how to handle this.

    Hope this helps,
    -drmike

  3. peiqinglong
    Member
    Posted 17 years ago #

    Dr. Mike,

    Thanks! I'm going to give that a try!

  4. Bike
    Member
    Posted 17 years ago #

    Hi peiqinglong, did you get this to work? I tried the link DrMike gave, but no effect.

    I have exactly the same situation as you described. My upcoming website is http://www.biketravellers.com but as traveller is British English, I have http://www.biketravelers.com as well (US english, one 'l'). It is parked on top and in the http.conf I have this entry:

    <VirtualHost 12.34.56.78>
    ServerAlias biketravellers.com *.biketravellers.com
    ServerAlias biketravelers.com http://www.biketravelers.com
    ServerAdmin webmaster@biketravellers.com
    DocumentRoot /home/username/public_html
    User username
    Group biketrav
    ServerName biketravellers.com

    I changed the 3rd line to
    ServerAlias biketravelers.com *.biketravelers.com
    and restarted Apache, but no effect.

    MU 1.2.3 with subdomains is working fine on http://www.biketravellers.com , but as you said when typing http://www.biketravelers.com it redirects to http://biketravellers.com/wp-signup.php?new=biketravelers

    DrMike or others, do you have any pointers on how to use the extra domains, preferably working for the same subdomains as well?

  5. Bike
    Member
    Posted 17 years ago #

    *bump* Anybody has an idea? This is not something that can be fixed with the multisite manager as far as I know. Anybody else uses more domains for one main site or with more knowledge about virtualhosts and .htaccess tricks?

    Cheers, Bike

  6. peiqinglong
    Member
    Posted 17 years ago #

    I never figured out how to make this work.

  7. lunabyte
    Member
    Posted 17 years ago #

    It's more in-depth than the average "hack", and more of an advanced topic requiring advanced skills. But it does work, and well.

  8. Bike
    Member
    Posted 17 years ago #

    thanks Lunabyte. I have full access to the server and can change anything I want; I am not afraid to get my hands dirty, but the solution in the thread DrMike pointed to did not work.

    Can you shed some light or at least point me and others in the right direction? Thanks in advance

  9. lunabyte
    Member
    Posted 17 years ago #

    The best I can offer up is a search for blog.domain.tld which will eventually dig up a thread where (if I remember right) I shed a little more light on it.

    As for a full detailed instructional walk through... I'm not up to putting it online, and answering a ton of questions or supporting it.

  10. Bike
    Member
    Posted 17 years ago #

    Hi Lunabyte and (welcome back) DrMike.
    I searched a lot on all vafiations of domain.tld, but could not work out a direction to go to on this subject.

    I do understand that you do not want to get hijacked to solve this problem for me, so help me (and others?) as far as you please, but I would appreciate a short description of <i>what </i>needs to be done, even though <i>how</i> is not detailed :)

    Thanks, Bike

  11. drmiketemp
    Member
    Posted 17 years ago #

    What software are you using for a hosting back end?

    Bike, if you've done just the apache wildcard as noted up above, you also have to do the DNS wildcard as noted in the readme.txt file for the second domain.

    We covered it in this thread as well. Please review the entire thread as it got expaned some, especially the bit about adding the info to the wp_site table.

    Hope this works for you,
    -drmike

  12. Bike
    Member
    Posted 17 years ago #

    Hi DrMike, I am on a VPS with Virtuozzo/WHM/Cpanel, So I can access all files needed and can park using Cpanel as well.

    I am not sure if the thread you mentioned applicable for what I need?

    I do not need:
    - Domain mapping
    - forwarding to be set up per blog
    - blog1.domain1.com to be different from blog1.domain2.com

    I do need:
    - blog1.domain1.com should resolve or forward to blog1.domain2.com
    - there should be only one blog with subdomain/name "blog1", independent if it resolves to domain1 or domain2.

    Basically domain1/2.com (as explained different spellings of the same word) should both work, whether they forward or not.

    Thanks for your time and assistance.

  13. lunabyte
    Member
    Posted 17 years ago #

    Simple rewrite rule in your htaccess file should solve it.

  14. Bike
    Member
    Posted 17 years ago #

    Thanks, that is option B, if I cannot get both/all domains to work independently (but with only one specific subdomain possible, so no different domains with the same sub).

    Maybe this is a silly question, but I could not find a working example of a rewrite rule that forwards to the same subdomain on another domain (so the wildcard-subdomain gets redirected to the same wildcard sub on the alternative domain)? And how does this work with the Vhost in httpd.conf vs the parked domains?

    Thanks for your time, Bike

  15. Bike
    Member
    Posted 17 years ago #

    I finally found a similar question on one forum and their solution was:

    RewriteEngine  on
    RewriteCond %{HTTP_HOST}   !^.*biketravellers\.com [NC]
    RewriteCond %{HTTP_HOST}   ^([^\.])*\.(.*)
    RewriteRule ^/(.*)         http://%1.biketravellers.com/$1 [L,R]

    However, when adding this to httpd.conf (at the end of the Vhost for this domain), and restarting apache, the only thing changed is that when entering xxxx.biketravelers.com it redirects to 'http://biketravellers.com/wp-signup.php?new=s' (doesn't matter what I put for 'xxxx', even if I put nothing, it just gives 's'...).
    When testing an existing subdomain like harry.biketravelers.com (it exists with double 'l'), it gives a 404. I tried putting it in the .htaccess, but that did not seem to do anything.
    What am I doing wrong?

    EDIT: slight correction: when trying http://www.biketravelers.com it does not offer to start a blog 's' but 'w'... (http://biketravellers.com/wp-signup.php?new=w). Any ReWrite experts here?

  16. Bike
    Member
    Posted 17 years ago #

    I am ready to dig in deep(er), but am simply stuck in the number of possibilities I have to try and the way they interact: what is the exact relation between the virtual host that MU needs, parked domains via Cpanel, httpd.conf settings & rewrites, .htaccess rewrites, CNAME/A records in my DNS.

    Any pointers about what to do where (and what NOT to do :) in order to have subdomains of domain1.com forward to the same subdomains of domain2.com? Thanks

About this Topic

  • Started 17 years ago by peiqinglong
  • Latest reply from Bike