Jump to:

4938 Posts in 16252 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » mod rewrite issue or?

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

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

Page: 1
Go to End
Author Topic: 2028 Views
  • bit99
    Avatar
    Community Member
    24 Posts

    mod rewrite issue or? Link to this post

    Hi,

    I have a question (re: server configs is my guess),

    Everything works on this new silverstripe website I put up, but there are a couple of strange (to me) things going on.
    when installing, I had the hosting company make the necessary upgrades to the server such as memory limit, mod rewrite, magic quotes,

    everything works on the website but the login panel is not (like on my other websites) located at /admin, but instead at index.php/admin
    same thing with /dev/build?flush=1, is located at index.php/dev/build?flush=1
    The previous pages get a 404 not found error page.

    is this a mod rewrite issue on the server? or something else?
    Has anyone seen this before?

    thanks,

  • bit99
    Avatar
    Community Member
    24 Posts

    Re: mod rewrite issue or? Link to this post

    to add to previous post,

    pages in the addressbar appear as:
    /index.php/company
    /index.php/contact

    etc.

    is this a mod_rewrite issue with the server config?

  • Mrfixer
    Avatar
    Community Member
    49 Posts

    Re: mod rewrite issue or? Link to this post

    looks certainley like a mod rewrite issue, had this myself just a few days ago.

    my advice would be run a php info test, to see if mod rewrite has been enabled by your host (who is your host by the way?). I had to do the mod rewrite myself via .htaccess (needed two files to do it) attached below:

    .httacess (this one goes in public_html)

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

    </IfModule>
    ### SILVERSTRIPE END ###

    .httacess (this one goes one folder above public_html)

    <IfModule mod_suphp.c>
       suPHP_ConfigPath /home/user/php.ini
       <Files php.ini>
          order allow,deny
          deny from all
       </Files>
    </IfModule>

    your mileage may vary but its worth a try..

  • bit99
    Avatar
    Community Member
    24 Posts

    Re: mod rewrite issue or? Link to this post

    thanks,
    I called the webhost and mentioned a possible mod_rewrite issue and a bit later it was fixed.
    so that seems to have been it.

  • Plato
    Avatar
    Community Member
    26 Posts

    Re: mod rewrite issue or? Link to this post

    I've had this issue a few times, and find it's normally caused when I've made a mess of the RewriteBase directive in the silvestripe-root .htaccess

    Make sure your rewrite base is relative to the domain that accesses the install (and of course that your host has mod_rewrite enabled).

    eg:

    example.com/ -> RewriteBase /
    example.com/ss/ -> RewriteBase /ss/

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