• Resolved achimudo

    (@achimudo)


    Hello,

    is there a good way to use the .htninja file from two or more different wordpress installations (public_html), located in one root. At the moment, I’ve created a folder in the root to place the wp-config.php of the first wp-installation in it. The path to it is set in the .htninja – it works correctly. Can I set up the same .htninja for a second or third wordpress installation, maybe with a condition? What is the best practice in a enviorment like this?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Sure, you can use any PHP code.
    Maybe you can rely on the$_SERVER['SERVER_NAME'] environment variable? For instance:

    <?php
    if ( strpos( $_SERVER['SERVER_NAME'], 'first_domain.tld') !== false ) {

    // Load first_domain.tld wp-config.php

    } elseif ( strpos( $_SERVER['SERVER_NAME'], 'second_domain.tld') !== false ) {

    // Load second_domain.tld wp-config.php

    }
    Thread Starter achimudo

    (@achimudo)

    Hello at nintechnet,

    sorry for late response and thank you very mutch for your answer. This is very helpfull and I hope it will help also many others. Great plugin and great support.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.