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

"index.php" in url, if not, don't work


Go to End
Reply

15 Posts   5230 Views

Avatar
__fabrice

2 June 2009 at 3:37am Community Member, 32 Posts

Hi,

I've installed SilverStripe (lastest version) on Ubuntu 9.04.. All work fine, but.... in the url, I see that "index.php" need to be write. If not, the url rewriting is not "in action".
For example, for the rebuild, this url is not valid : /relations_ships/db/rebuild?flush=1. I must add "index.php : /relations_ships/index.php/db/rebuild?flush=1

I try to see in the .htaccess, but the file is like the original after installation. Is in the apache2 configuration ?

thanks,
Fabrice

Avatar
Ben Gribaudo

2 June 2009 at 7:35am Community Member, 181 Posts

Hi Fabrice,

Would you please post the contents of your .htaccess file?

Thanks,
Ben

Avatar
__fabrice

2 June 2009 at 8:39am Community Member, 32 Posts

Hi,

Yes, this is :

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

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /silverstripe/relations_ships

RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$

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

Thanks,
Fabrice

Avatar
banal

2 June 2009 at 8:52am (Last edited: 2 June 2009 8:52am), Community Member, 901 Posts

Hi Fabrice

Are you sure that mod_rewrite is enabled on your webserver, for the folder in question?
AFAIK SilverStripe now also works without mod_rewrite (see this post: http://silverstripe.org/silverstripe-2-3-1rc1-released-testers-wanted/), and it seems the URL you're using is the one without rewrite!

Avatar
Ben Gribaudo

3 June 2009 at 12:32am Community Member, 181 Posts

Is your site mounted at http://your-domain-name/silverstripe/relations_ships or http://your-domain-name/relations_ships? If it's the latter, I think the RewriteBase directive (in .htaccess) should be "RewriteBase /relations_ships".

Ben

Avatar
__fabrice

3 June 2009 at 5:26am (Last edited: 3 June 2009 5:29am), Community Member, 32 Posts

hi,

Thanks for answers, but :

- Yes, the module rewrite is actived :

sudo a2enmod rewrite
Module rewrite already enabled

And in the .htacces, i must to write : RewriteBase /silverstripe/relations_ships 'cause the directories is that : /var/www/silverstripe/relations_ships

Fabrice

Avatar
Ben Gribaudo

3 June 2009 at 11:43pm Community Member, 181 Posts

Hum...there is a difference between having an Apache module installed and having it enabled. In your site's phpinfo() output, does the "Loaded Modules" section under one of the "apache" headings show "mod_rewrite"?

Ben

Avatar
__fabrice

4 June 2009 at 12:11am (Last edited: 4 June 2009 12:11am), Community Member, 32 Posts

hi,

Yes, in the section named "apache2handler", I've "mod_rewrite" in "Loaded Modules"...

Humm...

Fabrice

Go to Top