Jump to:

23576 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » "index.php" in url, if not, don't work

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 2
Go to End
Author Topic: 5234 Views
  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: "index.php" in url, if not, don't work Link to this post

    What's the URL where you want the SS site to appear--i.e. http://your-domain/something/?

  • __fabrice
    Avatar
    Community Member
    32 Posts

    Re: "index.php" in url, if not, don't work Link to this post

    Hi,

    Well, it's quite simple, the url looks like : http://localhost/my_site/index.php/accueil instead of http://localhost/my_site/accueil

    Fabrice

  • Ben Gribaudo
    Avatar
    Community Member
    181 Posts

    Re: "index.php" in url, if not, don't work Link to this post

    Is your RewriteBase set to "my_site" or "silverstripe/my_site"?

  • quamsta
    Avatar
    Community Member
    29 Posts

    Re: "index.php" in url, if not, don't work Link to this post

    This is happening to one of my sites too. mod_rewrite is installed and enabled. My SS installation is in http://mysite.com/my_installation/,

    my .htaccess has

    Rewrite Base /my_installation

    But I still have to put index.php in the URL as such

    http://mysite.com/my_installation/index.php/whatever-page

  • __fabrice
    Avatar
    Community Member
    32 Posts

    Re: "index.php" in url, if not, don't work Link to this post

    Hi,

    Thanks. My RewriteBase is "silverstripe/my_site", of course. So, all is ok, but the rewrite mod don't work. Is there a possibility then the rewrite_mod is in fact, not active ?

    Fabrice

  • banal
    Avatar
    Community Member
    901 Posts

    Re: "index.php" in url, if not, don't work Link to this post

    I'm quite certain that there's indeed a problem with your mod_rewrite. The index.php URLs are only meant as a fallback for hosts where rewriting isn't supported.
    You could try the following: Just after your RewriteBase Line, add the following:

    RewriteRule .* http://www.silverstripe.org [R=301,NC,L]

    You should be redirected to silverstripe.org whenever you try to visit your site. If not, your mod_rewrite doesn't work properly (maybe you're not allowed to override it via .htacces)

  • kiatng
    Avatar
    Community Member
    1 Post

    Re: "index.php" in url, if not, don't work Link to this post

    I just installed SS in a shared host environment. Like the title of this thread, I must have index.php in the URL in order to access the homepage, otherwise it is redirected to http://domain_name/cgi-sys/defaultwebpage.cgi

    I am not sure about rewrite at all or if it's disabled, but I have installed other apps (Magento, Joomla, Tiki) on the same host without this problem.

    This is a straight install of ver 2.4.5, although it did warn about not sure about rewrite in the pre-install page. I'll check with my host, but let me know if there is something I can do.

    [EDIT]
    It turned out that I have to clear the history in FF - Ctrl+Shift+Del.

    5234 Views
Page: 1 2
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.