ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Fix rewriting of additional domains to the canonical one (Task #115)


Added by Holger Just at 2011-01-31 11:12 pm. Updated at 2011-02-01 08:24 pm.


Status:Closed Start date:2011-01-31
Priority:Normal Due date:
Assignee:Holger Just % Done:

0%

Category:ChiliProject - Organization
Target version:Public Launch
Remote issue URL:

Description

Fix basic rewritung

Currently the HTTP vhost (NOT the HTTPS vhost) basically does this:

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

This creates a certificate warning when accessing http://chiliproject.com, as it forwards to https://chiliproject.com, but our certificate is only valid for chiliproject.org and www.chiliproject.org. Also, it doesn't fully handle redirects as Google expects it. Currently, chiliproject.net is shown in a search for chiliproject.

I propose the following change:

RewriteRule (.*) https://www.chiliproject.org/%{REQUEST_URI} [R=301,L]

The result can be checked with a

curl -v http://chiliproject.com

The contents of the Location header should be https://chiliproject.org/ and the HTTP status code of the answer should be 301.

Add additional domains for rewriting

All available domains should be rewritten. Ideally we would use that rewrite-rule for all requests that could not be handled in any other way. If that is not possible, at least the following domains should be in ServerAlias.


History

Updated by Eric Davis at 2011-01-31 11:52 pm

  • Project changed from Organization to ChiliProject

Updated by Eric Davis at 2011-02-01 06:24 am

It looks like it is configured right for the HTTPS site but not the HTTP site.

# HTTP

<VirtualHost *:80>
  ServerName www.chiliproject.org

  ServerAlias chiliproject.org chiliproject.com www.chiliproject.com

  RewriteEngine On
  RewriteCond %{HTTPS} !=on
  RewriteCond %{REQUEST_URI} !^/server-status
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

</VirtualHost>
# HTTPS
<VirtualHost _default_:443>
  ...
  ServerName www.chiliproject.org

  ServerAlias chiliproject.org chiliproject.com www.chiliproject.com

  RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.chiliproject.org$ [NC]
RewriteRule ^(.*)$ https://www.chiliproject.org$1 [R=301,L]
  ...

Updated by Eric Davis at 2011-02-01 06:39 am

Holger:

I think I got it configured with a change to the HTTP rewrites and removing the .com from the domain aliases. The vhost is using catchall virtual hosts so any domain should hit the app. Any non-.org HTTPS request will present a certificate error but I have all of the HTTP requests going directly to HTTPS .org.

  • Assignee changed from Eric Davis to Holger Just
  • Category set to ChiliProject - Organization
  • Status deleted ()

Updated by Holger Just at 2011-02-01 08:24 pm

Looks good. Thanks.

  • Status set to Closed

Also available in: Atom PDF