Jump to:

558 Posts in 3573 Topics by 244 members

Hosting Requirements

SilverStripe Forums » Hosting Requirements » mod_rewrite on DreamHost?

What you need to consider when choosing a hosting provider and plan.

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

Page: 1
Go to End
Author Topic: 1594 Views
  • neilcreagh
    Avatar
    Community Member
    94 Posts

    mod_rewrite on DreamHost? Link to this post

    Hi does anyone know how to get the mod_rewrite working on DreamHost so that index.php/ isn't showing before every link? The .htaccess file doesn't seem to work on Dreamhost - has anyone got this working correctly on Dreamhost?
    Thanks,
    Neil

  • neilcreagh
    Avatar
    Community Member
    94 Posts

    Re: mod_rewrite on DreamHost? Link to this post

    - SOLVED -
    Ok, I don't know if I was using an older v2.3 .htaccess file but this code is working for me:

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

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