Jump to:

4938 Posts in 16827 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Installing 2.2.3: mod_rewrite troubles

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

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

Page: 1 2 3 4
Go to End
Author Topic: 9873 Views
  • NickNameKnack
    Avatar
    Community Member
    7 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    arrrgh! now I get a 404 file not found. what the hec am I doing wrong?

  • NickNameKnack
    Avatar
    Community Member
    7 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    OK I tried once more and this is what the error says now - is there anybody who knows how to fix this one? I really wanted to use this software but it is getting too difficult to install:

    Installing SilverStripe...

    I am now running through the installation steps (this should take about 30 seconds)

    If you receive a fatal error, refresh this page to continue the installation

    * Creating 'mysite/_config.php'...
    * Creating /home/content/b/o/n/bonjour089/html/underground/mysite/_config.php
    * Creating '.htaccess' file...
    * Creating /home/content/b/o/n/bonjour089/html/underground/.htaccess
    * Building database schema...
    * Checking that friendly URLs work...
    * Friendly URLs are not working. This is most likely because mod_rewrite isn't configuredcorrectly on your site. Please check the following things in your Apache configuration; you may need to get your web host or server administrator to do this for you:
    o mod_rewrite is enabled
    o AllowOverride All is set for your directory

  • NickNameKnack
    Avatar
    Community Member
    7 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    I have not the faintest idea why but I clicked refresh and now the whole thing works! How confusing thank you all for the help! :0)

  • XannaX
    Avatar
    Community Member
    6 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    SOLVED: mod_rewrite Issues

    ISSUE: During installation the .htaccess file gets written to the "wrong" directory. It puts the .htaccess file in the SilverStripe-v directory after unpacking and doing a browser install. Remove the .htaccess file from the SilverStripe-v dir and place it in the root, problem solved. This is the correct code for .htaccess:

    ### SILVERSTRIPE START ###
    <Files *.ss>
       Order deny,allow
       Deny from all
       Allow from 127.0.0.1
    </Files>

    <Files web.config>
       Order deny,allow
       Deny from all
    </Files>

    ErrorDocument 404 /assets/error-404.html
    ErrorDocument 500 /assets/error-500.html

    <IfModule mod_alias.c>
       RedirectMatch 403 /silverstripe-cache(/|$)
    </IfModule>

    <IfModule mod_rewrite.c>
       SetEnv HTTP_MOD_REWRITE On
       RewriteEngine On
       RewriteBase /

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

  • dayhox
    Avatar
    Community Member
    2 Posts

    Re: Installing 2.2.3: mod_rewrite troubles Link to this post

    Thank you XannaX.
    After several reinstalls/Googles, finally found this and gave it a shot on my v3 SS server served by a Virtualmin host. All green, no warnings, and no more having to append index.php after my urls.
    Hot damn tamale!

    i did have to make one addition to the .htaccess to allow my root to direct to index.php without showing index.php

    DirectoryIndex index.php

    d

    9873 Views
Page: 1 2 3 4
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.