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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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