+ Reply to Thread
Results 1 to 5 of 5

Thread: Having 2 flynax scripts, one in Root and one in a Subfolder

  1. #1
    Junior Member
    Join Date
    Jan 2017
    Posts
    15

    Exclamation Having 2 flynax scripts, one in Root and one in a Subfolder

    Hi everyone

    We need to have 2 Flynax scripts running, one in the Root folder and one in a Subfolder. For our case, using subdomains is not preferred.

    I cannot manage .htaccess of Root folder to ignore the Subfolder and all contents of the 2nd script.


    I added this into the root .htaccess, but it is not working:
    Code:
    Only registered members can view the code.
    Can you help where to change in .htaccess?


    Thanks a lot for your help!

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,176
    Hello,

    You need only to edit the config.inc.php from /includes directory and change the line:

    define('RL_DIR', '');

    to:

    define( 'RL_DIR', 'subfolder' . RL_DS );


    and for the setting RL_URL_HOME set a full url to your subdirectory like 'https://www.your-site.com/subfolder/'

  3. #3
    Junior Member
    Join Date
    Jan 2017
    Posts
    15
    Thanks for your reply.

    I did these settings:

    define( 'RL_DIR', 'subfolder' . RL_DS );
    define('RL_URL_HOME', 'https://mysite.com/subfolder/');

    and by the way, this one is set like this:
    define('RL_ROOT', '/home/mysite/public_html/subfolder' . RL_DS . RL_DIR);


    Errors:

    PHP Warning: require_once(/home/mysite/public_html/subfolder/subfolder/includes/control.inc.php): failed to open stream: No such file or directory in /home/mysite/public_html/subfolder/index.php on line 33
    PHP Fatal error: require_once(): Failed opening required '/home/mysite/public_html/subfolder/subfolder/includes/control.inc.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/mysite/public_html/subfolder/index.php on line 33


    The problem is that a duplicated subfolder was added to those paths ("/subfolder/subfolder/").


    Just to mention, the version of root script is 4.5.2 and the subfolder script is 4.9.2. if that would help.

  4. #4
    Junior Member
    Join Date
    Jan 2017
    Posts
    15
    Quote Originally Posted by Sam.K View Post
    Thanks for your reply.

    I did these settings:

    define( 'RL_DIR', 'subfolder' . RL_DS );
    define('RL_URL_HOME', 'https://mysite.com/subfolder/');

    and by the way, this one is set like this:
    define('RL_ROOT', '/home/mysite/public_html/subfolder' . RL_DS . RL_DIR);


    Errors:

    PHP Warning: require_once(/home/mysite/public_html/subfolder/subfolder/includes/control.inc.php): failed to open stream: No such file or directory in /home/mysite/public_html/subfolder/index.php on line 33
    PHP Fatal error: require_once(): Failed opening required '/home/mysite/public_html/subfolder/subfolder/includes/control.inc.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/mysite/public_html/subfolder/index.php on line 33


    The problem is that a duplicated subfolder was added to those paths ("/subfolder/subfolder/").


    Just to mention, the version of root script is 4.5.2 and the subfolder script is 4.9.2. if that would help.


    When I changed RL_ROOT to:
    define('RL_ROOT', '/home/mysite/public_html' . RL_DS . RL_DIR);

    Homepage of subfolder script is working, but all the other links (https://mysite.com/subfolder/properties.html) get into the Root script rewrite rules, and thus 404 of the Root script shows up.

  5. #5
    Junior Member
    Join Date
    Jan 2017
    Posts
    15
    can anyone help with this?

+ Reply to Thread