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, biapar, Willr, Ingo, swaiba, simon_w

Can’t access /admin, all URLs include index.php


Reply


4 Posts   687 Views

Avatar
Mr. Neave

Community Member, 8 Posts

6 February 2014 at 9:08pm

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.

Avatar
mandrew

Core Development Team, 36 Posts

7 February 2014 at 9:55am

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>

Avatar
Mr. Neave

Community Member, 8 Posts

7 February 2014 at 12:41pm

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

Avatar
mandrew

Core Development Team, 36 Posts

7 February 2014 at 5:24pm

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