• Resolved atownley

    (@atownley)


    Hi,

    I’ve been running WordPress for a couple of months now, and overall I’m pretty happy. However, I was wondering if there was a good/recommended way to install WordPress when dealing with multiple domains and/or subdomains.

    I’ve seen some of the posts including “giving wordpress its own directory…” and “moving wordpress within your site”, but these don’t really seem to address my particular situation (or, maybe they do and I’m just missing it).

    what I want is to not move my blog so that it appears exactly as it does now (https://atownley.org), but that I can also host other add-on/subdomains with my provider. I am using a cpanel hosting service with shell access, but I don’t have access to the complete apache configuration file.

    What I want to do is have WordPress manage the root of this domain with my blog, but then be able to support additional subdomains or add-on domains in my public_html directory as follows:

    /[wp-installation]
    /domain1/[domain1 files]
    /domain2/[domain2 files]

    I may or may not run wordpress in the additional subdomains, but my main problem is that with the .htaccess configuration required to make my WordPress installation run, I can’t access any of the subdomains (I get a 500 error from Apache). I have explicitly excluded these subdomain directories from my .htaccess file, but this doesn’t work.

    I went into cpanel and attempted to do the “normal” subdomain stuff in the “hotlink protection” section. This gives entries like:

    RewriteCond %{HTTP_REFERER} !^https://domain1.atownley.org

    So, I’ve tried a union of all the configuration settings, but these don’t seem to work. Has anyone done anything like this before? I don’t really want to move the blog off the root of the site if I can help it. If I can’t do it this way, I’ll probably end up getting another hosting account, but, based on the cost, isn’t something that I want to do.

    I’m going to start reading about the mod_rewrite rules in more detail to see if there’s something in there, but I suspect the issue is more about how wordpress is set up to work. Any assisitance would be great.

    Thanks in advance,

    ast

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter atownley

    (@atownley)

    Finally got back around to solving this–really simple once I had a look at the mod_rewrite documentation.

    To solve the problem, I simply added:

    RewriteCond %{HTTP_HOST} ^atownley.org

    at the top of the ruleset and everything is now working as I expected. I’m surprised no one piped up with a “duh, dummy. You need to do this…” type of response, but neither my hosting provider or anyone here seemed to know.

    A few suggestions:

    Try a search. Common questions that are frequently answered get ignored sometimes (check forum rules).

    Try to be more concise with your question. See if you can whittle it down to a paragraph or two, and try to make your question as specific as possible.

    don’t you just make a new mysql database for each blog on each subdomian? thats what i do

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wordpress and hosting sub/add-on domains’ is closed to new replies.