• Resolved WSS1992

    (@wss1992)


    OK. Here’s the scenario…

    • I’m using Network Solutions
    • I have installed the Unix server
    • I have installed WordPress for two domains (they are both live)
    • Both WP subdirectories are in the directory htdocs/

    My index.php4 file looks like this:
    <?php header("location:/wordpressSubdirectory1"); ?>

    My problem is that when I type http://www.domain1.com it goes to domain1.com/wordpressSubdirectory1 – That’s good, but when I type http://www.domain2.com it naturally goes to domain1.com/wordpressSubdirectory1

    I need it to go to domain2.com/wordpressSubdirectory2. Now, I can accomplish that just by adding the subdirectry to the url string but I don’t want that, it makes the url overly long.

    So, my question is do I edit my index.php4 file to accomplish this or is there another remedy? Network Solutions tells me I should be able to nest both domains in the same htdocs/ directory and of course they do not support WP.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi WSS1992. Maybe this thread will help solve the issue.

    Thread Starter WSS1992

    (@wss1992)

    it’s the same thing only different. 🙂

    There has to be a simple solution that doesn’t involve reinventing the wheel.

    I have two domain names hung in the same htdocs directory. index.php tells you where to go. It tells both to go to the same subdirectory.

    This is what index.php looked like:

    <?php header("location:subdirectoryA/"); ?>

    There are two, I need to segregate them.

    Maybe this thread?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Are you actually running WordPress Multisite here?

    Multisite lets you map domains, but also there’s no need for weird location headers…

    Thread Starter WSS1992

    (@wss1992)

    Mike,

    I dunno. I have a master Windows Host package at NS. I have four sub domains hung under that. I have switched two over to a Unix Host package. Obviously, the first ran fine. It wasn’t until I created the second that this showed up. There will ultimately be two more,the main domain and the other sub.

    This cannot be that unusual. There must be hundreds if not thousands of folks who have NS Unix/Wordpress Host accounts with multiple domains in their htdocs directory.

    I just need the magic bullet to differentiate the two (ultimately four).

    Thread Starter WSS1992

    (@wss1992)

    bdbrown,

    No, that didn’t work, but thanks

    CD

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Windows … Ew.

    Okay on your MAIN domain (not a sub) go to domain.com/wp-admin/network

    If that says you’re not allowed, then you’re not running multisite and I’ll move this post out for you 🙂

    Thread Starter WSS1992

    (@wss1992)

    There’s the rub. The MAIN domain is still running under Windows. It is my primary revenue generator. I couldn’t afford for it to be down during development. Only two of my sub domains have been switched over to UNIX for the WordPress installation. They are complete and live I’m just having the described redirection issue with the second. I’m not a code slinger, but there MUST be a simple solution like editing the index.php4 file to differentiate.

    Thread Starter WSS1992

    (@wss1992)

    Mika,

    My ftp directory tree looks like this:

    (folder) backup
    (folder) cgi-bin
    (folder) htdocs

    Click on (folder) htdocs and the tree looks like this:

    (folder) WordPress-A
    (folder) WordPress-B
    index.php4

    This is what my (auto generated) index.php4 file looks like

    <?php header(“location:/WordPress-A”); ?>

    when I enter http://www.URL-A then http://www.URL-A/WordPress-A appears (as it should). BUT, when I enter http://www.URL-B then http://www.URL-B/WordPress-A appears instead of http://www.URL-B/WordPress-B (which is perfectly understandable since the index.php4 file has told it to do exactly that).

    I contend that there MUST be a string of code to insert into index.php4 that will solve this dilemma. Or am I going about this all wrong? I’ve tried fiddling with the code to no avail. I know enough to know that it is a string and as such sees only the last command so therefore I cannot just add to the string. It seems there must be an if/else if solution.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    (folder) WordPress-A
    (folder) WordPress-B
    index.php4

    This isn’t Multisite then.

    Multisite is using one install of WP to control Multiple sites. I’m going to move this to advanced so hopefully someone experienced with this can see it.

    Thread Starter WSS1992

    (@wss1992)

    Okie dokie. Now can you move me there, too? :o)

    Thread Starter WSS1992

    (@wss1992)

    Nevermind. Found it. Thanks for your help.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘multiple domains in same htdocs directory’ is closed to new replies.