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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

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

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

v2.4 index.php always in URL


Go to End


9 Posts   12020 Views

Avatar
ThrashCardiom

Community Member, 23 Posts

15 May 2010 at 8:40pm

I have installed 2.4 but it does not appear to be working correctly When I type in the server address the home page comes up but when I type in the URL with /admin (ie http://www.domain.tld/admin) on the end I get a page not found error. However, when I include index.php in the URL - http://www.domain.tld/index.php/admin - I get the login to the CMS. I have to include the index.php for any of the backend pages. For instance, I cannot do a straight /dev/build. I must use index.php/dev/build.

How can I correct this behaviour?

Avatar
lerni

Community Member, 81 Posts

15 May 2010 at 10:21pm

hi

are you working with lamp? anyway this means your mod_rewrite is not working correct. check it with phpinfo();

Avatar
Sean

Forum Moderator, 922 Posts

15 May 2010 at 11:54pm

Edited: 15/05/2010 11:56pm

Friendly URLs are not working because rewriting support isn't enabled on your webserver, or it's not setup correctly.

Apache:

1. Make sure mod_rewrite is enabled
2. Ensure that AllowOverride All is set for the location where SilverStripe is installed
3. Ensure the .htaccess file inside your SilverStripe directory has the rewrite rules setup

...or...

IIS:

1. Make sure you have IIS URL Rewrite module installed
2. Make sure a web.config file exists in your installation, and is filled in appropriately (the SS installer will do this for you during installation if the module is installed)

Avatar
ThrashCardiom

Community Member, 23 Posts

16 May 2010 at 5:26am

Thanks for the replies. "AllowOverride All" did the job.

Avatar
Nobrainer Web

Community Member, 138 Posts

27 August 2010 at 8:22pm

I had the same problem on my labtop.

Had another dev site running on my local machine, and noticed that the line "RewriteBase /~tn/developer/amexp" was missing in the non working site .htaccess. Adding the line and changing the path to the right folder solved the issue of having to have index.php in the URL.

### 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
RewriteBase /~tn/developer/amexp

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

Avatar
borriej

Community Member, 267 Posts

8 October 2010 at 9:34pm

Having the same problem, for some reason my url's on the home page are all with 'index.php'. Two months ago it was good.

- I have check _config.php - dev mode is OFF

- Uploaded a phpinfo, but when i search for mod_rewrite it isn't even in the list? :s Strange? or is it called different?

- How do you... Ensure that AllowOverride All is set for the location where SilverStripe is installed??? An explanation would be great.

- .htaccess file inside my SilverStripe directory has rewrite rules

Avatar
borriej

Community Member, 267 Posts

20 October 2010 at 3:21am

up! still got this problem..

Avatar
swaiba

Forum Moderator, 1899 Posts

20 October 2010 at 3:53am

someone suggested to remove index.php from your webroot in another thread about this as I remember...

Go to Top