Jump to:

23003 Posts in 11856 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Can’t access /admin, all URLs include index.php

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: 230 Views
  • Mr. Neave
    Avatar
    Community Member
    8 Posts

    Can’t access /admin, all URLs include index.php Link to this post

    Hi there,

    I have a SilverStripe 3 site running locally on MAMP but can’t access the admin — http://localhost/admin gives a page not found.

    Friendly URLs don’t seem to be working. Every page URL includes /index.php/.

    Seems like the two problems might seem to be related.

    Any ideas?

    Thanks in advance.

  • mandrew
    Avatar
    Core Development Team
    32 Posts

    Re: Can’t access /admin, all URLs include index.php Link to this post

    Hey mate,

    What version of mamp have you installed? Also which version of apache web server does it install? If you are using Apache 2.4 then add this piece of code in the Apache conf file (depends on installation, usually httpd.conf)

    <Directory /home/*/public_html>
    ...
    AllowOverride All
    DirectoryIndex disabled
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    </Directory>

  • Mr. Neave
    Avatar
    Community Member
    8 Posts

    Re: Can’t access /admin, all URLs include index.php Link to this post

    Hi Mike! Long time no see.

    It’s MAMP 2.2 and according to this page, http://www.mamp.info/en/documentation/releases.html, it’s running Apache HTTP Server 2.2.25.

    I’ve added those options into httpd.conf but it doesn’t seem to make a difference. Possibly I’ve just got the syntax wrong. It looks like this — is it correct?

    #
    # Each directory to which Apache has access can be configured with respect
    # to which services and features are allowed and/or disabled in that
    # directory (and its subdirectories).
    #
    # First, we configure the "default" to be a very restrictive set of
    # features.
    #
    <Directory />
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    </Directory>

    <Directory /home/*/public_html>
    AllowOverride All
    DirectoryIndex disabled
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    </Directory>

    Thanks,
    Brent

  • mandrew
    Avatar
    Core Development Team
    32 Posts

    Re: Can’t access /admin, all URLs include index.php Link to this post

    Indeed mate : )

    Because it is Apache 2.25 you shouldn't need the code so revert what you have done.

    The only other thing is to check if mod_rewrite is enabled by adding a php file with just the following code in your base directory and search for mod_rewrite on the page that appears

    <?php
    phpinfo();

    Mod_rewrite is used to create the friendly urls, otherwise you see the index.php appear like in your first example

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