Jump to:

22993 Posts in 11829 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » xxx.com/index.php to xxx.com

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

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

Page: 1
Go to End
Author Topic: 4294 Views
  • wonnepfropfen
    Avatar
    Community Member
    18 Posts

    xxx.com/index.php to xxx.com Link to this post

    Hello

    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:

    ### SILVERSTRIPE START ###
    <Files *.ss>
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    </Files>

    <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]
    </IfModule>
    ### SILVERSTRIPE END ###

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: xxx.com/index.php to xxx.com Link to this post

    Hi,

    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?

  • wonnepfropfen
    Avatar
    Community Member
    18 Posts

    Re: xxx.com/index.php to xxx.com Link to this post

    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!

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