Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » navigation links broke

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1140 Views
  • grilldan
    Avatar
    Community Member
    135 Posts

    navigation links broke Link to this post

    I am using 1&1 hosting (USA).

    I am using this .htaccess file to fix the php for php5, and the mod_rewrite.

    Options -MultiViews
    AddType x-mapp-php5 .php
    AddHandler x-mapp-php5 .php
    ### SILVERSTRIPE START ###
    RewriteEngine On
    RewriteBase /SS_test/silverstripe-v2.2.2
    RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
    ### SILVERSTRIPE END ###

    The problem I have now, is that non of the navigation links work.

    First, I have to have this to even see the home page:
    mywebsite.com/SS_test/silverstripe-v2.2.2/?flush=1

    Then, If I click on any of the links, such as About us (mywebsite.com/SS_test/silverstripe-v2.2.2/about_us/)
    I get a 404 error, even though the page clearly exists since it is still on the default install.

    Another thing, when I click the home link (it links to mywebsite.com/SS_test/silverstripe-v2.2.2/home/), I am taken to
    mywebsite.com/SS_test/silverstripe-v2.2.2/check-php.php

    Has anyone ever seen something like this? My guess is its a problem with my .htaccess file.

  • cliersch
    Avatar
    Community Member
    75 Posts

    Re: navigation links broke Link to this post

    Hi!
    Did you try my .htaccess code here: http://www.silverstripe.com/site-builders-forum/flat/149657?showPost=151157#post150171?

    Maybe the rewrite path is wrong. My rewrite base and the rewrite rule is a little different in the example. But sorry, no further ideas!

  • grilldan
    Avatar
    Community Member
    135 Posts

    Re: navigation links broke Link to this post

    I did use your .htaccess code, but It didn't work just "as is" so I modified it a little bit. I'll go back and try to get it to work again. Now that I haven't messed with the site for a day, maybe something will just "click".

    Thanks again for the awesome code

    ------------------------------edit 1

    wow... just WOW!

    I had a space after the line:

    RewriteBase /SS_test/silverstripe-v2.2.2

    and that messed everything up.

    It works wonderfully now lol!

    Thanks again for your help

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