mod_rewrite & Silverstripe

Discussion in 'Server Operation' started by rabrol, Dec 27, 2007.

  1. rabrol

    rabrol New Member

    I am in the process of installing Silverstripe CMS. Unfortunately I am running into trouble with mod_rewrite.

    I get the following message :
    # Creating 'mysite/_config.php'...
    # Creating '.htaccess' file...
    # Building database schema...
    # Checking mod_rewrite works
    # ERROR: mod_rewrite not working, redirecting to mod_rewrite test page

    The mod_rewrite test page shows that it is enabled. Is there something I need to do to enable mod_rewrite on a per domain basis?

    Rob
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Which distribution are you using? What's in the .htaccess file?
     
  3. rabrol

    rabrol New Member

    I'm on Ubuntu 6.06LTS.

    When the Silverstripe CMS begins its install, it writes a new .htaccess file. This is all it creates (its no wonder the mod_rewrite doesn't work!).

    ### SILVERSTRIPE START ###

    ### SILVERSTRIPE END ###

    That is the full content of .htaccess. I wrote another .htaccess myself which was copied from another Silverstripe user, but when the install process was started it was overwritten with this file.

    Does ISPConfig support mod_rewrite on all sites by default?
    Thanks,
    Rob
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Please try this:
    Code:
    a2enmod rewrite
    /etc/init.d/apache2 force-reload
     
  5. rabrol

    rabrol New Member

    This is what I got when I entered a2enmod rewrite
    "This module is already enabled!"

    I did the forced reload anyway, but no change.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Can you overwrite the .htaccess file with your own version after the Silverstripe installation?
     
  7. DruKe

    DruKe New Member

    For anyone else looking to get a SilverStripe site going under ISPConfig you'll need this in the directives box:

    <Directory "/path/to/site/web">
    options followsymlinks MultiViews Includes ExecCGI
    AllowOverride All
    order allow,deny
    Allow from all
    </Directory>

    In my installation on a SLES 10 SP1 box, it 'bombs' out on the rewrite test but I forced it to continue and it works fine anyway.
     

Share This Page