Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » 1&1.com hosting errors (mod_rewrite)

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: 7121 Views
  • grilldan
    Avatar
    Community Member
    135 Posts

    1&1.com hosting errors (mod_rewrite) Link to this post

    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.

  • cliersch
    Avatar
    Community Member
    75 Posts

    Re: 1&1.com hosting errors (mod_rewrite) Link to this post

    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

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: 1&1.com hosting errors (mod_rewrite) Link to this post

    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

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: 1&1.com hosting errors (mod_rewrite) Link to this post

    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?

    7121 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.