17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1878 Views |
-
problem with multiple installations

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 OnRewriteRule ^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 OnRewriteRule \.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
-
Re: problem with multiple installations

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.
-
Re: problem with multiple installations

28 September 2007 at 7:26pm
Here's something that seems to work in some testing i've just done:
### SILVERSTRIPE START ###
RewriteEngine OnRewriteRule \.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
-
Re: problem with multiple installations

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. -
Re: problem with multiple installations

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
-
Re: problem with multiple installations

2 October 2007 at 2:56am Last edited: 2 October 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]
| 1878 Views | ||
|
Page:
1
|
Go to Top |




