Jump to:

23481 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » url problem

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

Page: 1
Go to End
Author Topic: 1068 Views
  • animasola
    Avatar
    Community Member
    121 Posts

    url problem Link to this post

    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!

  • Willr
    Avatar
    Forum Moderator
    5503 Posts

    Re: url problem Link to this post

    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.

  • sergieboy
    Avatar
    Community Member
    33 Posts

    Re: url problem Link to this post

    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...

    1068 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.