Jump to:

4952 Posts in 14381 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » How do I enable mod_rewrite so that I can install SS?

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: 2811 Views
  • Rikardoavocado
    Avatar
    Community Member
    3 Posts

    How do I enable mod_rewrite so that I can install SS? Link to this post

    Hi everyone,

    I'm trying to install SS onto my hostgator hosting and I'm being asked to enable mod_rewrite.

    The message reads: You need mod_rewrite to use friendly URLs with SilverStripe, but it is not enabled.

    But how do I go about doing this? I keep reading about adding ReWriteEngine On and AllowOverride On to a .htaccess file. Is this correct? And which .htaccess file, there seem to be a few.

    I really need some help.

    Thanks in advance,

    Rikardoavocado

  • swaiba
    Avatar
    Forum Moderator
    1785 Posts

    Re: How do I enable mod_rewrite so that I can install SS? Link to this post

    FYI we are moving from unitedhosting rackspace, but on UH this warning came up - I ignored it - the url would have the index.php in it after installation - I removed it and then never saw it again (infact I delete the index.php now anyway). Basically I am saying give the installation a go and see if it works - it is possible that it is enabled but the ss inatall.php is not picking it up...

  • Rikardoavocado
    Avatar
    Community Member
    3 Posts

    Re: How do I enable mod_rewrite so that I can install SS? Link to this post

    Hi, Thanks for your comments.

    I tried the install as you suggested, and it seemed to work.

    But I now have the index.php showing up in the URL

    http://www.domain.com/index.php/about-us/

    What do I do about that? Do I just delete the index.php file to make it come up as http://www.domain.com/about-us/?

    Richard

  • Rikardoavocado
    Avatar
    Community Member
    3 Posts

    Re: How do I enable mod_rewrite so that I can install SS? Link to this post

    I manged to get it up and running. I installed via cpanel rather than copying the file via Cyberduck ftp using the ssbits.com screencast.

    Thanks for you help though.

  • almoubda
    Avatar
    Community Member
    1 Post

    Re: How do I enable mod_rewrite so that I can install SS? Link to this post

    I tried to install my site's root folder outside public_html, because its an addon domain and I didn't like the idea of having maindomain.com/addondomain.com/ and this caused the mod_rewrite warning to appear during installation. I ignored it and installed, but my site had the index.php problem, suc as addondomain.com/index.php/contact-us
    I found a solution by copying the .htaccess file from the maindomain.com root folder (which already had an SS installation) to the root folder of the addon domain

    For reference, .htaccess contains the following code:

    ### 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>

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

    and now the site works perfectly (hopefully no future problems)

    I thought this might help

    Regards
    Ali

  • arthurdent
    Avatar
    Community Member
    153 Posts

    Re: How do I enable mod_rewrite so that I can install SS? Link to this post

    Now I'm confused... after configuring my machine (Mac OS) so I could actually SEE .htaccess files (I was somewhat bemused to see a pile of these on my desktop) I set up one with the text as supplied above and dragged and dropped it to the root directory on the webserver - except it isn't working. I still have the /index.php/ problem.

    Any tips, suggestions, etc appreciated - I'm just a humble designer who, while he doesn't mind getting his fingers dirty with coding, is not a programming guru!

    Strangely enough, now I can see the .htaccess file on the server as well...

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