Jump to:

4938 Posts in 16827 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » how do you remove /index.php/ from the urls?

Getting SilverStripe up and running on your computer and on your web server.

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

Page: 1
Go to End
Author Topic: 2412 Views
  • otherjohn
    Avatar
    Community Member
    125 Posts

    how do you remove /index.php/ from the urls? Link to this post

    Hi all,
    I am using SS 2.4 r2 and just installed it with ease. I have this .htaccess file with it. What do I do to make friendly urls without the index.php in the url?
    John

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

  • otherjohn
    Avatar
    Community Member
    125 Posts

    Re: how do you remove /index.php/ from the urls? Link to this post

    handtyping the url without /index.php/ fixed it and its all working now.

    What can I put in the .htaccess file to auto redirect it in case I have a rouge link out there?
    John

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