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.

Archive /

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

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

1&1.com hosting errors (mod_rewrite)


Reply


4 Posts   7242 Views

Avatar
grilldan

Community Member, 135 Posts

20 August 2008 at 6:08pm

Edited: 20/08/2008 10:28pm

I am having problems installing with 1&1 hosting.

The problem occurs with mod_rewrite.

My .htaccess file looks like:

### SILVERSTRIPE START ###
Options -MultiViews
AddType x-mapp-php5 .php
RewriteEngine On
RewriteBase /

However, I still get the error saying that mod_rewrite is turned off.

I have the .htaccess file in the same folder as all the SS files/folders.

(
mod_rewrite doesn't appear to be working. Make sure:

- mod_rewrite is enabled in your httpf.conf
- AllowOverride is enabled for the current path.
)

here is some snips from phpinfo();

PHP Version 5.2.6
Apache/1.3.34 Ben-SSL/1.55
System...............Linux infong 2.4 #1 SMP Tue Dec 18 22:34:10 UTC 2007 i686 GNU/Linux
Server API..........CGI
PHP API..............20041225
PHP Extension....20060613

If there is anything else you would need to help me, please let me know, and I'll get the info for it.

Avatar
cliersch

Community Member, 75 Posts

21 August 2008 at 6:29pm

Edited: 21/08/2008 6:33pm

Hi grilldan,

we are hosting a few clients on 1&1 (in Germany) and Silverstripe works perfectly on their server.
Whitch SS version do you use?
Try this .htaccess code:

### SILVERSTRIPE START ###
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
RewriteEngine On
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /sapphire/main.php?url=%1&%{QUERY_STRING} [L]
### SILVERSTRIPE END ###

cheers, tiga

Avatar
grilldan

Community Member, 135 Posts

22 August 2008 at 9:15am

Edited: 22/08/2008 9:32am

SS version 2.2.2

I'll edit this post once I try the new .htaccess code, thanks!

---------------edit1

It still doesn't want to work right.

I'm on 1and1 USA.

I contacted the support, and all I got was just a link to a page telling me to add the line:

RewriteEngine On

to the .htaccess file, which I had already done.

Do you have any other suggestions?

---------------edit2

I went ahead, and continued anyway, and now on the page

/home/successfullyinstalled?flush=1

I get the error

Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/17/d212047050/htdocs/public_html/SS_test/silverstripe-v2.2.2/sapphire/core/ManifestBuilder.php on line 35

I'll do some research on this, and post my findings.

---------------edit3

Figured it out!

Installed, continued even though there was the error (I forgot that the install overwrites the .htaccess file)

New .htaccess file:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
### SILVERSTRIPE START ###
RewriteEngine On
RewriteBase /SS_test/silverstripe-v2.2.2
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
### SILVERSTRIPE END ###

Thank you for youd help :D

Avatar
grilldan

Community Member, 135 Posts

23 August 2008 at 3:22pm

Instead of making a new thread, I'll just bump this one.

I believe the issue is with my .htaccess file. I am using this code in my .htaccess file

Options -MultiViews
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
### SILVERSTRIPE START ###
RewriteEngine On
RewriteBase /SS_test/silverstripe-v2.2.2
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
### SILVERSTRIPE END ###

The problem:
(I am using SS 2.2.2, default install w/ blackcandy template)

These links work:
/home/
/about-us/
/contact-us/

These page gives me a 404:
/admin/

I can view this page:
/security/login
but when I login, I get a green box above the login saing:
"You're logged in as ."

This is why I think I have a mod_rewrite issue, because I cant view the "sub-directories"...

Is there another RewriteCond that I can toss in for sub directories maybe?