Jump to:

5537 Posts in 1737 Topics by 1223 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Use standalone PHP in a subdirectory

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3
Go to End
Author Topic: 4426 Views
  • borriej
    Avatar
    Community Member
    267 Posts

    Re: Use standalone PHP in a subdirectory Link to this post

    sorry, but that also doesn't work.

    Is this really the way to exclude SilverStripe from looking into some folders?

    Is there another way to make sure SS doesn't say 'page not found' in 'Non-SilverStripe-Folders?'

  • borriej
    Avatar
    Community Member
    267 Posts

    Re: Use standalone PHP in a subdirectory Link to this post

    Correction, it did work in some way:

    RewriteCond %{REQUEST_URI} !/webshop/catalog

    When I access www.mydomain.com/webshop/catalog
    I automatically get the index.php so that is good news! Before I got the 'Page Not Found' message.

    But when I try to login in the admin part (webshop/catalog/admin)
    I get the firefox error: Page isn't redirecting correctly
    (or something like that, had to translate it from dutch to enlish)

    The php script redirects after a succesfull login to:

    header('Location: ' . HTTPS_CATALOG_SERVER . $psRefer);

    Where $psRefer is:

       //if refer was passed in, use it. else default to index
       $psRefer = (strlen(@$_POST['psRefer'])>0) ? $_POST['psRefer'] : DIR_WS_ADMIN.'index.php';

    DIR_WS_ADMIN is:

    define('DIR_WS_ADMIN', '/webshop/catalog/admin/');

  • borriej
    Avatar
    Community Member
    267 Posts

    Re: Use standalone PHP in a subdirectory Link to this post

    Ok i Solved it

    I used the osCommerce 'Log-in Log-out 1.7' module.

    index.php includes 'applictation_top.php' which created a loop in loading the page. So Firefox/Safari couldn't load them.

    For the people interessted:

    Replace:

    // login logout 1.7
    if($_SERVER['SERVER_PORT'] == 80) {
    Header("Location: " . HTTPS_CATALOG_SERVER . DIR_WS_ADMIN);
    exit;
    }

    Into:

    // login logout 1.7
    if(getenv('HTTPS') == 'OFF') {
    Header("Location: " . HTTPS_CATALOG_SERVER . DIR_WS_ADMIN);
    exit;
    }

    4426 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.