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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Hosting Requirements /

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

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

mod_rewrite on DreamHost?


Go to End


2 Posts   2379 Views

Avatar
neilcreagh

Community Member, 136 Posts

8 May 2010 at 3:03am

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

Avatar
neilcreagh

Community Member, 136 Posts

18 May 2010 at 3:22am

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