Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » problem with multiple installations

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1961 Views
  • j_metal
    Avatar
    3 Posts

    problem with multiple installations Link to this post

    Hello all,

    I have 2 installation of SilverStripe on one domain

    installation one is on the root folder

    and installation 2 is on /english folder which located inside the root folder

    on the root folder my .htaccess is

    /////////////////////////////////////////
    RewriteEngine On

    RewriteRule ^english/.*$ - [PT]

    RewriteRule \.js$ - [L]
    RewriteRule \.css$ - [L]
    RewriteRule \.png$ - [L]
    RewriteRule \.jpg$ - [L]
    RewriteRule \.gif$ - [L]
    RewriteRule \.php$ - [L]

    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    ### SILVERSTRIPE END ###

    /////////////////////////////

    and on my /english folder I have

    /////////////////////////////////////////
    RewriteEngine On

    RewriteRule \.js$ - [L]
    RewriteRule \.css$ - [L]
    RewriteRule \.png$ - [L]
    RewriteRule \.jpg$ - [L]
    RewriteRule \.gif$ - [L]
    RewriteRule \.php$ - [L]

    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    ### SILVERSTRIPE END ###

    ////////////////////////////////////////

    notice that the .htaccess on my root folder has

    RewriteRule ^english/.*$ - [PT]

    so mod_rewrite would ignore the /english folder.

    but still it returns a

    "Sorry, it seems you were trying to access a page that doesn't exist.
    Please check the spelling of the URL you were trying to access and try again."

    also, "http://domain.com/english/?url=/english" appears on my address box

    what am I doing wrong here? any suggestion?

    thanks

  • ScottiouS
    Avatar
    Community Member
    54 Posts

    Re: problem with multiple installations Link to this post

    You can try using the _exclude.php file in your mysite folder. It should include code like so:
    <?php
    /**
    * Exclude these modules from the manifest
    */
    ManifestBuilder::$restrict_to_modules = array(
    'cms',
    'jsparty',
    'mysite',
    'sapphire'
    );

    ?>

    In effect it's really specifying which folders to include and only those. So put this in the SS site in your root web folder and then your subfolder one ought to work. Hopefully this helps.

  • DesignCity
    Avatar
    38 Posts

    Re: problem with multiple installations Link to this post

    Here's something that seems to work in some testing i've just done:

    ### SILVERSTRIPE START ###
    RewriteEngine On

    RewriteRule \.js$ - [L]
    RewriteRule \.css$ - [L]
    RewriteRule \.png$ - [L]
    RewriteRule \.jpg$ - [L]
    RewriteRule \.gif$ - [L]
    RewriteRule \.php$ - [L]

    RewriteCond %{REQUEST_URI} ^(.*)$

    RewriteCond %{REQUEST_URI} !^(.*)(directory-name-to-ignore)(.*)$

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    ### SILVERSTRIPE END ###

    This should stop mod_rewrite rewriting for the directory specified.

    Your SS install in a subfolder should just have the default .htaccess file in it.

    Let us know how you go

  • j_metal
    Avatar
    3 Posts

    Re: problem with multiple installations Link to this post

    Hi ScottiouS

    Thanks for the reply! I've tried that but it didn't fix anything It still does the same thing.

  • j_metal
    Avatar
    3 Posts

    Re: problem with multiple installations Link to this post

    Hi DesignCity,

    I also tried that but no luck.

    I should add that the SS installation on the root folder came from an installation on another server. I was required to transfer the installation to a new server. That worked fine (I think so).

    Then the problem came in when I needed to copy the SS installation (the same installation from the old server) to the /english folder on the new server. The purpose of this is to have the same contents, layout etc. but it would be translated to English.

    If that made any sense

  • Fuzz10
    Avatar
    Community Member
    786 Posts

    Re: problem with multiple installations Link to this post

    Metal..

    I did the exact same thing with http://www.e-village.nl , and it works for me.

    My directory is called "en" , all I did was adding the following rule to the .htaccess file in the root.

    RewriteRule ^en - [L]

    1961 Views
Page: 1
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.