Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

problem with multiple installations


Go to End


6 Posts   2466 Views

Avatar
j_metal

3 Posts

28 September 2007 at 5:34pm

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

Avatar
ScottiouS

Community Member, 54 Posts

28 September 2007 at 6:16pm

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.

Avatar
Design City

38 Posts

28 September 2007 at 7:26pm

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 :)

Avatar
j_metal

3 Posts

28 September 2007 at 7:26pm

Hi ScottiouS

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

Avatar
j_metal

3 Posts

28 September 2007 at 10:07pm

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 :(

Avatar
Fuzz10

Community Member, 791 Posts

2 October 2007 at 2:56am

Edited: 02/10/2007 2:57am

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]