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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

url problem


Go to End


3 Posts   1970 Views

Avatar
animasola

Community Member, 121 Posts

31 July 2010 at 4:33pm

I have a problem with my site. It always appends index.php at the end of every URL. even when I flush the database or template or go into the administration panel, it always needs to have that appended or else it will not be able to find the page.

I have sought help before and also thought that it could be a .htacess problem. here is my .htaccess file contents by the way:

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

here is the site:
http://sumilaofarm.com/stripe/index.php/

you might notice that index.php is appended at every address in the site.

If anyone knows or is familiar with this problem, can you please point me in the right direction? Any piece of information would be highly appreciated. Thanks! :)

Avatar
Willr

Forum Moderator, 5523 Posts

31 July 2010 at 6:38pm

SS will use index.php if mod_rewrite has not been installed or enabled on your server. This is what the "IfModule mod_rewrite.c" line does in your .htaccess.

You should check with your host to see if that is enabled / working correctly.

Avatar
sergieboy

Community Member, 33 Posts

24 January 2012 at 9:27pm

Edited: 24/01/2012 9:29pm

Concerning this mod_rewrite enabled or not. I'm getting desperate !
Since three weeks, my host is saying that mod_rewrite is enabled, I'm beginning to feel like an idiot. I searched SS forum for all kind of answers. During SS installation, I got a warning that mod_rewrite is not enabled. So I contacted my host. He said that it definitly is enabled. Then I read something by one of the guru's on this forum that sometimes, even now and then, Silverstripe doesn't see that mod_rewrite is in fact enabled and that one should complete the installation. So I did. Result is that I always get this index.php in my URL. Checking my htaccess file is of course done as one on the first things. This is the content (also after searching and reading SS forum) :
### 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>
ErrorDocument 404 /assets/error-404.html
ErrorDocument 500 /assets/error-500.html
<IfModule mod_alias.c>
RedirectMatch 403 /silverstripe-cache(/|$)
</IfModule>
<IfModule mod_rewrite.c>
###SetEnv HTTP_MOD_REWRITE On###
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###

You'll notice that I tried something I read on the forum with : SetEnv HTTP_MOD_REWRITE On but then again commented it out because it didnt work neither.
Are there people on this forum also having a provider in the Netherlands and also having this problem ??
By the way; my first provider (begin january) even didn't have enough allocated RAM to let me open my CMS...
And I have to admit, this provider is very good concerning price and quality. The only thing that's a real pain is this mod_rewrite...