Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

navigation links broke


Go to End


3 Posts   1572 Views

Avatar
grilldan

Community Member, 135 Posts

22 August 2008 at 11:14am

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.

Avatar
cliersch

Community Member, 75 Posts

22 August 2008 at 6:23pm

Edited: 22/08/2008 6:25pm

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!

Avatar
grilldan

Community Member, 135 Posts

23 August 2008 at 4:37am

Edited: 23/08/2008 4:41am

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 :D