Jump to:

4951 Posts in 14019 Topics by 1491 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » v2.4 index.php always in URL

Getting SilverStripe up and running on your computer and on your web server.

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

Page: 1 2
Go to End
Author Topic: 6897 Views
  • ThrashCardiom
    Avatar
    Community Member
    20 Posts

    v2.4 index.php always in URL Link to this post

    I have installed 2.4 but it does not appear to be working correctly When I type in the server address the home page comes up but when I type in the URL with /admin (ie http://www.domain.tld/admin) on the end I get a page not found error. However, when I include index.php in the URL - http://www.domain.tld/index.php/admin - I get the login to the CMS. I have to include the index.php for any of the backend pages. For instance, I cannot do a straight /dev/build. I must use index.php/dev/build.

    How can I correct this behaviour?

  • lerni
    Avatar
    Community Member
    80 Posts

    Re: v2.4 index.php always in URL Link to this post

    hi

    are you working with lamp? anyway this means your mod_rewrite is not working correct. check it with phpinfo();

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: v2.4 index.php always in URL Link to this post

    Friendly URLs are not working because rewriting support isn't enabled on your webserver, or it's not setup correctly.

    Apache:

    1. Make sure mod_rewrite is enabled
    2. Ensure that AllowOverride All is set for the location where SilverStripe is installed
    3. Ensure the .htaccess file inside your SilverStripe directory has the rewrite rules setup

    ...or...

    IIS:

    1. Make sure you have IIS URL Rewrite module installed
    2. Make sure a web.config file exists in your installation, and is filled in appropriately (the SS installer will do this for you during installation if the module is installed)

  • ThrashCardiom
    Avatar
    Community Member
    20 Posts

    Re: v2.4 index.php always in URL Link to this post

    Thanks for the replies. "AllowOverride All" did the job.

  • Nobrainer Web
    Avatar
    Community Member
    134 Posts

    Re: v2.4 index.php always in URL Link to this post

    I had the same problem on my labtop.

    Had another dev site running on my local machine, and noticed that the line "RewriteBase /~tn/developer/amexp" was missing in the non working site .htaccess. Adding the line and changing the path to the right folder solved the issue of having to have index.php in the URL.

    ### 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 /~tn/developer/amexp

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

  • borriej
    Avatar
    Community Member
    267 Posts

    Re: v2.4 index.php always in URL Link to this post

    Having the same problem, for some reason my url's on the home page are all with 'index.php'. Two months ago it was good.

    - I have check _config.php - dev mode is OFF

    - Uploaded a phpinfo, but when i search for mod_rewrite it isn't even in the list? :s Strange? or is it called different?

    - How do you... Ensure that AllowOverride All is set for the location where SilverStripe is installed??? An explanation would be great.

    - .htaccess file inside my SilverStripe directory has rewrite rules

  • borriej
    Avatar
    Community Member
    267 Posts

    Re: v2.4 index.php always in URL Link to this post

    up! still got this problem..

  • swaiba
    Avatar
    Forum Moderator
    1784 Posts

    Re: v2.4 index.php always in URL Link to this post

    someone suggested to remove index.php from your webroot in another thread about this as I remember...

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