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

Installer saying .htaccess is not enabled when it is...


Reply


3 Posts   1124 Views

Avatar
ccburns

Community Member, 74 Posts

14 October 2010 at 5:30pm

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[/url]

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

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[/url]

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

Cheers,
Colin

Avatar
edk

Community Member, 39 Posts

14 October 2010 at 5:44pm

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>

Avatar
ccburns

Community Member, 74 Posts

14 October 2010 at 7:33pm

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