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, Ed, biapar, Willr, Ingo

Cannot install, issues with mod_rewrite

Go to End

13 Posts   51895 Views


Community Member, 3 Posts

29 March 2007 at 11:55pm

Hi Guys.

Really happy that a new beta is out, as the previous one would not work for me.

This installation is working a lot better for me, but I'm stuck on the error....

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

* mod_rewite is enabled in your httpd.conf
* AllowOverride is enabled for the current path.

Please check these options, then refresh this page.

-as far as i can see mod_rewrite is enabled, but I am unsure about the AllowOverride for current path.

Any help would be greatly appreciated!



Community Member, 58 Posts

30 March 2007 at 3:26am

Edited: 30/03/2007 3:40am


I'm quite new to SilverStripe, but I've had a similar problem and will try my best ;).

1) You need to activate mod_rewrite in Apache's httpd.conf, both the module (but you have done that, otherwise the installer would complain on the first page) and AllowOverride. For your document root set AllowOverride to All. On my Windows pc it looks like this (c:/webserver is the document root) - not sure if this is great for security, but it's only a test machine:

<Directory "C:/Webserver">
Options All
AllowOverride All
Order allow,deny
Allow from all

2) Now you could test if mod_rewrite is generally working, just to make sure. Or skip this step if you are sure everything is fine.
I used the example of Bob and Alice from for testing (just copy and paste alice.html, bob.html and the .htaccess).

3) On my pc mod_rewrite was ok (step 2 was working), but I still got this error.
So I changed line 11 in "rewritetest.php" (directly in the Silverstripe directory) to this:
//@$testrewriting = file_get_contents('http://' . $_SERVER['SERVER_ADDR'] . $baseURL . '/' . 'InstallerTest/testRewrite');
@$testrewriting = file_get_contents('http://' . $_SERVER[HTTP_HOST] . $baseURL . '/' . 'InstallerTest/testRewrite');

I think the problem was that my apache is bound to port 8080 and server_addr disregards the port (but I might be wrong :D).
Anyway, this worked out for me. Hope it can help you as well.

Best regards,

PS: Tested on Win XP, Apache 2.2.4, PHP 5.2.1, MySQL 5.0.27


Community Member, 18 Posts

30 March 2007 at 4:01am


get through that point, only thing you need is to ;

cat > .htaccess

# Standard SilverStripe HTACCESS file

RewriteEngine On

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

This will be fixed eventually. Meanwhile, you need a valid .htaccess. This assumes you have already set up virtual name-based hosting.


Community Member, 3 Posts

30 March 2007 at 8:19am


It was the Options All that did it, I only had it as FollowSymLinks.
As this is done on my root dir of /, is this going to cause any security errors?

Thanks all,



Forum Moderator, 628 Posts

30 March 2007 at 8:55pm


Community Member, 58 Posts

31 March 2007 at 12:15am

Vodor, concerning the security: I think I have not phrased that well. I didn't want to imply it's insecure - it just didn't know and care too much, as it's no public server.
But as far as I know it should be fine :).

You could also check it with to be sure :P


Community Member, 33 Posts

7 April 2007 at 5:30am

Edited: 07/04/2007 5:33am

In rc5 neither is working for me:
-- changing the SERVER_ADDR in testing allow_override nor
-- Options All in <Directory> nor
-- thing with .htaccess

Any suggestions?


Forum Moderator, 628 Posts

12 April 2007 at 9:11pm

pouderstream, so you're basically implying that while you had 2.0.0 (i assume) working, you tried to upgrade to rc5 and its not even the installer, but the whole package that didn't work?

note that the best way to upgrade is simply to overwrite sapphire, cms, jsparty folders, you don't need to "install" it via the install.php file...


Go to Top