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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Go to End

4 Posts   6125 Views


Community Member, 18 Posts

27 April 2013 at 7:38am


I'm using Silverstripe 3.

Would anyone know how my htaccess has to look like, so that mod_rewrite is active. I want to get rid of the index.php within the URL. And if I just copy the htaccess text of an older version of Silverstripe the page is not displayed anymore.

Would anyone able to help me.

Thank you.

I tried using this:

<Files *.ss>
Order deny,allow
Deny from all
Allow from

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)

RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]


Forum Moderator, 1899 Posts

28 April 2013 at 12:42am


It's probably an issue that the server you are using doesn't have it rather than the .htaccess file is faulty (assuming you are using the default). Are you on the localhost?


Community Member, 18 Posts

28 April 2013 at 2:19am

Hello Swaiba

Thanks for your reply!

I've first asked my provider and they told me it's an issue of Silverstripe. So I've had a look at the config-file and htaccess, but I don't know what to change in order to get rid off the "index.php" within the URL. I think another issue that occurs because of that, is that the preview of the backend won't work.

Right now my .htaccess is empty. What would be the default content of the htaccess? Maybe would help already.

Thanks for your help!


Forum Moderator, 267 Posts

18 May 2014 at 10:23pm

Edited: 18/05/2014 10:24pm

If you are using SilverStripe 3 then your code in the the htaccess file above is incorrect (note the reference to 'sapphire'? this was what our framework was called back in version 2).

To get the new SilverStripe 3.1 version you can look at the SilverStripe base files at

Also please note, I'm going to change the title of your thread I it seems we are being indexed for adult entertainment websites!