Project

General

Profile

Change the starting page of Redmine 3.0.x

Added by shadow liu about 8 years ago

I modify [installdir]/redmine/app/controllers/welcome_controller.rb, thereby changing

class WelcomeController < ApplicationController
  caches_action :robots

  def index
    @news = News.latest User.current
    @projects = Project.latest User.current
    redirect_to :controller =>'projects', :action =>'show', :id =>'home/wiki'
  end

  def robots
    @projects = Project.all_public.active
    render :layout => false, :content_type => 'text/plain'
  end
end

But in my browser(chrome & firefox),the URL 'home/wiki' is change to 'home%20Fwiki', And the page is 404 .
How can i fix that ?


Replies (4)

RE: Change the starting page of Redmine 3.0.x - Added by Volker Kopetzky about 8 years ago

I made it easier for myself by using a rewrite rule (running apache) in public/.htaccess

root@projects /opt/bitnami/apps/redmine/htdocs
$ cat public/.htaccess 
RewriteEngine On
RewriteRule ^$ /projects [L]

This redirects the site home directory to any URL I like, in this case the list of all projects.

Note that my directory /opt/bitnami/apps/redmine/htdocs very likely will be different on your instance.

Rule of thumb: .htaccess is in the same public directory as favicon.ico.

RE: Change the starting page of Redmine 3.0.x - Added by shadow liu about 8 years ago

I don't use mod_fastcgi in apache, So the .htaccess is not work.

RE: Change the starting page of Redmine 3.0.x - Added by Volker Kopetzky about 8 years ago

This solution needs mod_rewrite which is loaded in most apache instances (that I know of;).
mod_fastcgi is not required.

RE: Change the starting page of Redmine 3.0.x - Added by shadow liu about 8 years ago

thanks, it's work. I enable mod_rewrite in apache.

    (1-4/4)