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.

Hosting Requirements /

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

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

mod_rewrite on DreamHost?


Reply


2 Posts   1674 Views

Avatar
neilcreagh

Community Member, 98 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, 98 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 ###