21293 Posts in 5733 Topics by 2602 members
| Go to End | Next > | |
| Author | Topic: | 3574 Views |
-
"index.php" in url, if not, don't work

2 June 2009 at 3:37am
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=1I try to see in the .htaccess, but the file is like the original after installation. Is in the apache2 configuration ?
thanks,
Fabrice -
Re: "index.php" in url, if not, don't work

2 June 2009 at 7:35am
Hi Fabrice,
Would you please post the contents of your .htaccess file?
Thanks,
Ben -
Re: "index.php" in url, if not, don't work

2 June 2009 at 8:39am
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_shipsRewriteCond %{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 -
Re: "index.php" in url, if not, don't work

2 June 2009 at 8:52am Last edited: 2 June 2009 8:52am
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! -
Re: "index.php" in url, if not, don't work

3 June 2009 at 12:32am
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
-
Re: "index.php" in url, if not, don't work

3 June 2009 at 5:26am Last edited: 3 June 2009 5:29am
hi,
Thanks for answers, but :
- Yes, the module rewrite is actived :
sudo a2enmod rewrite
Module rewrite already enabledAnd in the .htacces, i must to write : RewriteBase /silverstripe/relations_ships 'cause the directories is that : /var/www/silverstripe/relations_ships
Fabrice
-
Re: "index.php" in url, if not, don't work

3 June 2009 at 11:43pm
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
-
Re: "index.php" in url, if not, don't work

4 June 2009 at 12:11am Last edited: 4 June 2009 12:11am
hi,
Yes, in the section named "apache2handler", I've "mod_rewrite" in "Loaded Modules"...
Humm...
Fabrice
| 3574 Views | ||
| Go to Top | Next > |



