Jump to:

4938 Posts in 16764 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Installer saying .htaccess is not enabled when it is...

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

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

Page: 1
Go to End
Author Topic: 1087 Views
  • ccburns
    Avatar
    Community Member
    74 Posts

    Installer saying .htaccess is not enabled when it is... Link to this post

    Hi All,

    This is one of the first times I have tried installing SilverStripe on an external server and I've run into an issue where the installer is saying that Apache mod_rewrite is not installed, but when I test it is working as you would expect.

    Here is a link or two which might help.

    INSTALLER - if you just go to the root it shows a default "no site" landing page
    [url=http://sarangvacationhomes.com/install.php]http://sarangvacationhomes.com/install.php

    TEST OF MOD REWRITE
    [url=http://sarangvacationhomes.com/TEST/hellovariable.html]http://sarangvacationhomes.com/TEST/hellovariable.html

    REWRITE RULE in /TEST/.htacess

    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^hello([^/]*).html$ index.php?link=$1 [L]

    PHP CODE in /TEST/index.php

    <?php
    echo "THIS IS index.php<hr/>";
    echo "THE VARIABLE PASSED IS VIA THE URL IS {$_GET['link']}";
    ?>

    Here is the set up of the server
    [url=http://sarangvacationhomes.com/test.php]http://sarangvacationhomes.com/test.php

    If anyone could help point me in the right direction for debugging and getting this working I would be very grateful.

    Cheers,
    Colin

  • edk
    Avatar
    Community Member
    39 Posts

    Re: Installer saying .htaccess is not enabled when it is... Link to this post

    Hi Colin,

    I had this "warning" before when installing on a IIS server. You could just try completing the install anyway. Then when the install is complete, just open up the .htaccess file and make sure the mod_rewrite code is in there. (FYI: SS sites will run with Mod Rewrite enabled, but the URLs just aren't as intuitive and pretty).

    The code you want to see in the .htaccess file once the install completes. If it's not there just try adding it.

    <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /Your-Directory-Name-Here

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

  • ccburns
    Avatar
    Community Member
    74 Posts

    Re: Installer saying .htaccess is not enabled when it is... Link to this post

    I tried installing anyway but an error occurred. I could get into the admin panel but everytime I tried something I go an error.

    I am going to just upload the codebase from my local machine (which is what I usually do) but when it didn't work the first time I thought I would try running the installer.

    I will update the thread when I have tested the dev code base from my local machine uploaded and tested

    Cheers,
    Colin

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