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.

Installing SilverStripe

Getting SilverStripe up and running on your computer and on your web server.

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

Installing SS on 1and1


Reply

5 Posts   2469 Views

Avatar
Valorinbattle

16 February 2010 at 8:31am Community Member, 95 Posts

I've read thru all the archived articles about this, but none of it works for me. I'm trying to install the latest version of SS and keep getting this error:

_______________
Friendly URLs are not working. This is most likely because mod_rewrite isn't configuredcorrectly on your site. Please check the following things in your Apache configuration; you may need to get your web host or server administrator to do this for you:

* mod_rewrite is enabled
* AllowOverride All is set for your directory
_______________

I have added this to my .htaccess file:
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
RewriteEngine On
RewriteBase /

but still no joy. I'm using 1and1 (USA). Any help from someone that has theirs working would be appreciated. Thanks!

~ James

Avatar
mjrider

23 October 2010 at 12:19pm Community Member, 1 Post

I have the same problem. if you have found anything to help with this problem I would love to know

Avatar
Xochi

23 October 2010 at 12:47pm (Last edited: 23 October 2010 12:48pm), Community Member, 6 Posts

Greetings,

I finally got this to work with 1and1. This is what worked for me. See if you have this section in your .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} sssite$
RewriteRule (.*) $1/ [L]

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

Xochi

Avatar
nathanpr

15 March 2011 at 2:40am (Last edited: 15 March 2011 2:40am), Community Member, 1 Post

I have tried countless configurations of my .htaccess file to enable mod_rewrite, but so far all have proved unsuccessful. I tried what Xochi suggested, and nothing. I am trying to install Silverstripe on a non-dedicated 1and1 Linux server.

Below are my attempts...

#
#ATTEMPT A
#
#<IfModule mod_rewrite.c>
#   SetEnv HTTP_MOD_REWRITE On
#   RewriteEngine On
#   
#   RewriteBase /
#   RewriteCond %{REQUEST_URI} ^(.*)$
#   RewriteCond %{REQUEST_FILENAME} !-f
#   RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
#</IfModule>

#
#ATTEMPT B
#
#Options +FollowSymLinks
#Options -MultiViews
#RewriteEngine On
#RewriteBase /
#RewriteCond %{REQUEST_FILENAME}.php -f
#RewriteRule (.*) $1\.php [L]

#
#ATTEMPT C
#
# (turns http://domain.com/xyz.html into http://domain.com/index.php?xyz)
#
#RewriteEngine on
#RewriteBase /
#RewriteRule ^([a-z]+)\.html$ /index.php?$1 [R,L]

#
#ATTEMPT D
#
#<IfModule mod_rewrite.c>
# SetEnv HTTP_MOD_REWRITE On
# RewriteEngine On
# RewriteBase /
# RewriteCond %{REQUEST_URI} sssite$
# RewriteRule (.*) $1/ [L]
#
# RewriteCond %{REQUEST_URI} ^(.*)$
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
#</IfModule>

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

I have tried variations of the attempts listed above. I have been commenting/un-commenting attempts above, so don't say that I need to remove the #'s

If anyone has suggestions, I would appreciate it!

Avatar
vivilanco

20 April 2011 at 7:56pm Community Member, 19 Posts

Hi All -

I don't know if this will help but I am currently installing it on 1and1 myself and after 2days of headache I've some how managed to get it working.

this is what I did... I don't know if it will be the same for you guys but here:

I was required to put the following in a php.ini file in the root directory:

magic_quotes_gpc = off
asp_tags = off

I then had a day and a half problem with mod_rewrite (I spend this time playing with the .htaccess and other elements) - but I decided to go ahead even with mod_rewrite having the tantrum that it was encountering! Once it was all installed, as predicted my menu was http://domain.co.uk/index.php/about-us. I then decided to change the .htaccess, changing the following worked for me:

changed -

RewriteCond %{REQUEST_URI} ^(.*)$


to

RewriteCond %{REQUEST_URI} ^(.*)/$

that worked but it killed my http://domain.co.uk/admin (that returned a 404).

I then changed it back:

RewriteCond %{REQUEST_URI} ^(.*)/$


to

RewriteCond %{REQUEST_URI} ^(.*)$

and it worked.

Please see my .htaccess below:

.htaccess

### SILVERSTRIPE Start ###
AddType x-mapp-php5 .php

Options +Indexes +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} sssite$
RewriteRule (.*) $1/ [L]

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

<Files *.ss>
   
Order deny,allow
   
Deny from all
   
Allow from 127.0.0.1

</Files>

<Files web.config>
   
Order deny,allow
   
Deny from all

</Files>
ErrorDocument 404 /assets/error-404.html

ErrorDocument 500 /assets/error-500.html
RedirectMatch 403 /silverstripe-cache(/|$)
### SILVERSTRIPE END ###

I hope this can help some people