head	1.25;
access;
symbols
	TIGRIS_1_1_0RC2:1.17.6.2
	TIGRIS_1_1_0RC1:1.17.6.2
	TIGRIS_1_1:1.17.6.2.0.2
	TIGRIS_1_0_8:1.17.6.2
	TIGRIS_1_0_8RC3:1.17.6.2
	TIGRIS_1_0_8RC2:1.17.6.2
	TIGRIS_1_0_8RC1:1.17.6.2
	TIGRIS_1_0_7:1.17.6.2
	TIGRIS_1_0_7RC3:1.17.6.2
	TIGRIS_1_0_7RC2:1.17.6.2
	TIGRIS_1_0_7RC1:1.17.6.2
	TIGRIS_1_0_6:1.17.6.1
	TIGRIS_1_0_6RC5:1.17.6.1
	TIGRIS_1_0_6RC4:1.17.6.1
	TIGRIS_1_0_6RC3:1.17.6.1
	TIGRIS_1_0_6RC2:1.17.6.1
	TIGRIS_1_0_6RC1:1.17.6.1
	TIGRIS_1_0_5:1.17.6.1
	TIGRIS_1_0_5RC6:1.17.6.1
	TIGRIS_1_0_5RC5:1.17.6.1
	TIGRIS_1_0_5RC4:1.17.6.1
	TIGRIS_1_0_5RC3:1.17.6.1
	TIGRIS_1_0_5RC2:1.17.6.1
	TIGRIS_1_0_5RC1:1.17.6.1
	TIGRIS_1_0_4:1.17.6.1
	TIGRIS_1_0_3:1.17.6.1
	TIGRIS_1_0_2:1.17
	TIGRIS_1_0_1:1.17
	TIGRIS_1_0:1.17.0.6
	TIGRIS_1_0_0:1.17
	TIGRIS_1_0_0_RC1:1.17.0.2
	dlr:1.1.1
	TIGRIS_0_9_2_4:1.16
	TIGRIS_0_9_2_3:1.16
	HELM_PEER_PORT_BRANCH:1.1.1.2
	TURBINE_PEER:1.16
	TIGRIS_0_9_2_1:1.16
	TIGRIS_0_9_2:1.16.0.2
	TIGRIS_0_9_0:1.15.0.4
	TIGRIS_0_8_4:1.15.0.2
	NEWHELM:1.1.1.1
	TIGRIS_NOV_12_2000:1.1.1
	OLDHELM:1.10.0.4
	TIGRIS_NOV_11_2000:1.10
	TIGRIS_SEP_13_2000:1.10.0.2
	TIGRIS_BASELINE:1.7;
locks; strict;
comment	@# @;


1.25
date	2001.07.21.00.07.17;	author edk;	state Exp;
branches;
next	1.24;

1.24
date	2001.06.22.18.22.47;	author dprice;	state Exp;
branches;
next	1.23;

1.23
date	2001.06.22.16.25.11;	author dprice;	state Exp;
branches;
next	1.22;

1.22
date	2001.06.21.19.39.53;	author dprice;	state Exp;
branches;
next	1.21;

1.21
date	2001.06.08.05.08.28;	author dprice;	state Exp;
branches;
next	1.20;

1.20
date	2001.05.30.03.39.01;	author dlr;	state Exp;
branches;
next	1.19;

1.19
date	2001.05.16.03.19.25;	author jrobbins;	state Exp;
branches;
next	1.18;

1.18
date	2001.04.25.19.36.04;	author edk;	state Exp;
branches;
next	1.17;

1.17
date	2001.03.27.18.38.28;	author edk;	state Exp;
branches
	1.17.6.1;
next	1.16;

1.16
date	2000.12.23.18.45.13;	author jrobbins;	state Exp;
branches;
next	1.15;

1.15
date	2000.11.29.12.38.18;	author jrobbins;	state Exp;
branches
	1.15.4.1;
next	1.14;

1.14
date	2000.11.29.01.42.11;	author edk;	state Exp;
branches;
next	1.13;

1.13
date	2000.11.17.04.32.47;	author edk;	state Exp;
branches;
next	1.12;

1.12
date	2000.11.15.19.00.28;	author edk;	state Exp;
branches;
next	1.11;

1.11
date	2000.11.12.22.57.30;	author dlr;	state Exp;
branches;
next	1.10;

1.10
date	2000.10.03.19.23.50;	author jrobbins;	state Exp;
branches;
next	1.9;

1.9
date	2000.10.02.22.06.09;	author jrobbins;	state Exp;
branches;
next	1.8;

1.8
date	2000.09.30.00.14.45;	author jrobbins;	state Exp;
branches;
next	1.7;

1.7
date	2000.09.27.02.33.57;	author jrobbins;	state Exp;
branches;
next	1.6;

1.6
date	2000.09.14.04.22.09;	author ed;	state Exp;
branches;
next	1.5;

1.5
date	2000.09.07.01.58.41;	author jrobbins;	state Exp;
branches;
next	1.4;

1.4
date	2000.08.28.20.45.07;	author ed;	state Exp;
branches;
next	1.3;

1.3
date	2000.08.23.18.47.53;	author ed;	state Exp;
branches;
next	1.2;

1.2
date	2000.08.23.18.16.11;	author ed;	state Exp;
branches;
next	1.1;

1.1
date	2000.08.23.17.25.08;	author ed;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.11.12.21.13.47;	author dlr;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2001.02.21.00.28.06;	author dlr;	state Exp;
branches;
next	;

1.15.4.1
date	2001.01.12.08.35.08;	author jrobbins;	state Exp;
branches;
next	;

1.17.6.1
date	2001.04.25.19.35.21;	author edk;	state Exp;
branches;
next	1.17.6.2;

1.17.6.2
date	2001.06.22.06.09.12;	author edk;	state Exp;
branches;
next	;


desc
@@


1.25
log
@make the URL used to view ProjectHome consistent so relative links will
be valid.
@
text
@################
# redirect so we can track how people leave our site

RewriteRule ^/servlets/GoTo/(.*)$                                       $1 [R,L]

# this provides us with a consistent path for the project home page --
# so that relative links will work.  keep the query string if its present
# (since that's used for the projectID in non-vhosting mode)
RewriteCond %{QUERY_STRING} ^(..*)$
RewriteRule ^/servlets/ProjectHome$                       /?%1 [R=permanent,L]

RewriteRule ^/servlets/ProjectHome$                       / [R=permanent,L]

################
# reserved sections of the URI space for components

RewriteRule ^(/(files|unbranded-.*|branding|sharedimages|icons|servlets|local-access-only)/.*)$       $1 [PT,L]


################
# non-vhosted access to project pages

RewriteRule ^(/project/[-a-zA-Z0-9_]+)$                   $1/ [R,L]

# special case for www
RewriteRule ^/project/www/$                               /servlets/DomainHome?projectName=www [PT,L]
RewriteRule ^/project/([-a-zA-Z0-9_]+)/$                  /servlets/ProjectHome?projectName=$1 [PT,L]

### /project/___/(/nonav)?*
# nonav files w/o trailing `/'s
# - append a `/' if this specifies an existing directory
#
# The redirect rule for dirs w/o a trailing / is so that relative links from
# implicit index.html files will work (http://x.org/docs & http://x.org/docs/
# look different to a client when constructing absolute links from relative
# links)
RewriteCond %{REQUEST_URI}                                ^/project/([-a-zA-Z0-9_]+)/(nonav/)?(.*[^/])$
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%3         -d
RewriteRule ^(.*)$                                        $1/ [R,L]

### /project/___/nonav/*
# Now add implicit index.html to URIs with trailing `/'s and attempt to serve:
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*)/$       /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.wm&page=$2/index.html [PT,L]
# Default is to serve a binary file:
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*)$        /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.wm&page=$2 [PT,L]

### /project/___/*
# Now add the implicit index.html to URIs with trailing `/'s and attempt to serve:
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*)/$             /servlets/ContentHelmNoodle?projectName=$1&page=$2/index.html [PT,L]
# Serve as HTML when we recognize the extension:
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*\.s?html?)$     /servlets/ContentHelmNoodle?projectName=$1&page=$2 [QSA,PT,L]
# Default is to serve as binary:
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*)$              /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.wm&page=$2 [PT,L]

################
# vhosted access to project pages, vhost name detected in HelmServlet

# Special case for www:
RewriteCond %{HTTP_HOST} ^www\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/$                                           /servlets/DomainHome [PT,L]
RewriteRule ^/$                                           /servlets/ProjectHome [PT,L]
# Note, instances may want to add a special rewrite rule for the domain haome page.

### ___.DOMAIN/(nonav/)?*
# If there is no trailing `/' and we find an existing directory, add the `/' and redirect:
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.__DOMAIN__(:[0-9]*)?/(nonav/)?(.*[^/])$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%4         -d
RewriteRule ^(.*)$                                        $1/ [R,L]

### ___.DOMAIN/nonav/*
# If there is a trailing `/', add the implicit index.html and attempt to serve it as binary:
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^.*\.__DOMAIN__(:[0-9]*)?/nonav/.*/$ [NC]
RewriteRule ^/nonav/(.*)/$                                /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.wm&page=$1/index.html [PT,L]

# Default to serve as binary:
# TODO, use SecureView or helm noodle even on non-branded html.
RewriteCond %{HTTP_HOST}                                  ^.*\.__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*)$                                 /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.wm&page=$1 [PT,L]

### ___.DOMAIN/*
# If there is a trailing `/', add the implicit index.html and attempt to serve:
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^.*\.__DOMAIN__(:[0-9]*)?/.*/$ [NC]
RewriteRule ^/(.*)/$                                      /servlets/ContentHelmNoodle?page=$1/index.html [PT,L]

# If we recognize the extension, attempt to serve it as HTML:
RewriteCond %{HTTP_HOST}                                  ^.*\.__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/(.*\.s?html?)$                              /servlets/ContentHelmNoodle?page=$1 [QSA,PT,L]

# Default to serving as binary:
RewriteCond %{HTTP_HOST}                                  ^.*\.__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/(.*)$                                       /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.wm&page=$1 [PT,L]



<Directory __HTDOC_ROOT__>
  Options Indexes FollowSymLinks
  AllowOverride None
  order allow,deny
  allow from all
</Directory>

@


1.24
log
@Removed one missed `+'.
Factored 6 lines (2 rule "sets").
@
text
@d6 8
@


1.23
log
@Removed uneeded robustness to `/' and some other extraneous cruft.
Added comments.
@
text
@d9 1
a9 1
RewriteRule ^(/+(files|unbranded-.*|branding|sharedimages|icons|servlets|local-access-only)/.*)$       $1 [PT,L]
d21 1
a21 1
### /project/___/nonav/*
d29 2
a30 2
RewriteCond %{REQUEST_URI}                                ^/project/([-a-zA-Z0-9_]+)/nonav/(.*[^/])$
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%2         -d
d33 1
a39 5
# Again with the directories and redirects:
RewriteCond %{REQUEST_URI}                                ^/project/([-a-zA-Z0-9_]+)/(.*[^/])$
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%2         -d
RewriteRule ^(.*)$                                        $1/ [R,L]

d56 1
a56 1
### ___.DOMAIN/nonav/*
d58 2
a59 2
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.__DOMAIN__(:[0-9]*)?/nonav/(.*[^/])$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%3         -d
d62 1
a72 5
# If there is no trailing `/' and we find an existing directory, add the `/' and redirect:
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.__DOMAIN__(:[0-9]*)?/(.*[^/])$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%3         -d
RewriteRule ^(.*)$                                        $1/ [R,L]

@


1.22
log
@Rewrite again to redirect dirs to the same name with a trailing `/'.
Made more robust to multiple `/'s.
@
text
@d15 1
a15 1
RewriteRule ^(/+project/+[-a-zA-Z0-9_]+)$                 $1/ [R,L]
d18 2
a19 2
RewriteRule ^/+project/+www/+$                            /servlets/DomainHome?projectName=www [PT,L]
RewriteRule ^/+project/+([-a-zA-Z0-9_]+)/+$               /servlets/ProjectHome?projectName=$1 [PT,L]
d21 4
d29 1
a29 1
RewriteCond %{REQUEST_URI}                                ^/+project/+([-a-zA-Z0-9_]+)/+nonav/+(.*[^/])$
d33 8
a40 7
# $2 will never be led by a /
RewriteRule ^/+project/+([-a-zA-Z0-9_]+)/+nonav/+([^/].*)/$ /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.wm&page=$2/index.html [PT,L]
# $2 will never be led by a slash but may be empty
RewriteRule ^/+project/+([-a-zA-Z0-9_]+)/+nonav/+(.*)$    /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.wm&page=$2 [PT,L]

# again with the redirects...
RewriteCond %{REQUEST_URI}                                ^/+project/+([-a-zA-Z0-9_]+)/+(.*[^/])$
d44 6
a49 7
# $2 will never be led and always be followed by a /
RewriteRule ^/+project/+([-a-zA-Z0-9_]+)/+([^/].*)/$      /servlets/ContentHelmNoodle?projectName=$1&page=$2/index.html [PT,L]

RewriteRule ^/+project/+([-a-zA-Z0-9_]+)/+(.*\.s?html?)$  /servlets/ContentHelmNoodle?projectName=$1&page=$2 [QSA,PT,L]

# $2 will never be led by a slash but may be empty
RewriteRule ^/+project/+([-a-zA-Z0-9_]+)/+(.*)$           /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.wm&page=$2 [PT,L]
d54 1
a54 1
#special case for www
d56 8
a63 19
RewriteRule ^/+$                                          /servlets/DomainHome [PT,L]
RewriteRule ^/+$                                          /servlets/ProjectHome [PT,L]
# note, instances may want to add a special rewrite rule for the domain haome page

RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.(__DOMAIN__)(:[0-9]*)?/+nonav/(.*[^/])$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%4         -d
RewriteRule ^(/+nonav.*)$                                 $1/ [R,L]

RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.(__DOMAIN__)(:[0-9]*)?/+nonav/([^/].*)/$ [NC]
RewriteRule ^/+nonav/+([^/].*)/$                           /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.wm&page=$1/index.html [PT,L]

#TODO, use SecureView or helm noodle even on non-branded html
RewriteCond %{HTTP_HOST}                                  ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/+nonav/+(.*)$                               /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.wm&page=$1 [PT,L]

# There's always data in %4 here since otherwise it would have been caught in
# the DomainHome & ProjectHome 50 lines or so above
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.(__DOMAIN__)(:[0-9]*)?/(.*[^/])$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%4         -d
d66 14
a79 5
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.(__DOMAIN__)(:[0-9]*)?/+([^/].*)/$ [NC]
RewriteRule ^/+([^/].*)/$                                 /servlets/ContentHelmNoodle?page=$1/index.html [PT,L]

RewriteCond %{HTTP_HOST}                                  ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/+([^/].*\.s?html?)$                         /servlets/ContentHelmNoodle?page=$1 [QSA,PT,L]
d81 11
a91 2
RewriteCond %{HTTP_HOST}                                  ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/+([^/].*)$                                  /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.wm&page=$1 [PT,L]
@


1.21
log
@Issue number:
Obtained from:
Submitted by:  dprice
Reviewed by:
At EDK's suggestion I have rewritten the RewriteRules to only look for
index.html if their target is actually a directory.  Incidentally managed
to remove most of the redirects.  This works with 1.0.5 but I don't have a
HEAD instantiated anywhere to test against.
@
text
@d9 1
a9 1
RewriteRule ^(/(files|unbranded-.*|branding|sharedimages|icons|servlets|local-access-only)/.*)$       $1 [PT,L]
d15 2
d18 2
a19 6
RewriteRule ^/project/www/?$                              /servlets/DomainHome?projectName=www [PT,L]
RewriteRule ^/project/([-a-zA-Z0-9_]+)/?$                 /servlets/ProjectHome?projectName=$1 [PT,L]

RewriteCond %{REQUEST_URI} ^/project/([^/]*)/nonav/(.*)$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%2 -d
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*)/?$      /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.wm&page=$2/index.html [PT,L]
d21 17
a37 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*)$        /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.wm&page=$2 [PT,L]
d39 2
a40 3
RewriteCond %{REQUEST_URI} ^/project/([^/]*)/(.*)$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%2 -d
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*)/?$            /servlets/ContentHelmNoodle?projectName=$1&page=$2/index.html [PT,L]
d42 1
a42 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*\.s?html?)$     /servlets/ContentHelmNoodle?projectName=$1&page=$2 [QSA,PT,L]
d44 2
a45 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*)$              /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.wm&page=$2 [PT,L]
d52 2
a53 2
RewriteRule ^/$                                           /servlets/DomainHome [PT,L]
RewriteRule ^/?$                                           /servlets/ProjectHome [PT,L]
d56 6
a61 3
RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^(.*)\.(__DOMAIN__)(:[0-9]*)?/nonav/(.*)$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%4 -d
RewriteRule ^/nonav/(.*)/?$                               /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.wm&page=$1/index.html [PT,L]
d64 8
a71 2
RewriteCond %{HTTP_HOST} ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*)$                                 /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.wm&page=$1 [PT,L]
d73 2
a74 3
RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^(.*)\.(__DOMAIN__)(:[0-9]*)?/(.*)$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%4 -d
RewriteRule ^/(.*)/?$                                     /servlets/ContentHelmNoodle?page=$1/index.html [PT,L]
d76 2
a77 2
RewriteCond %{HTTP_HOST} ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/(.*\.s?html?)$                              /servlets/ContentHelmNoodle?page=$1 [QSA,PT,L]
d79 2
a80 2
RewriteCond %{HTTP_HOST} ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/(.*)/?$                                     /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.wm&page=$1 [PT,L]
@


1.20
log
@Corrected template references.
@
text
@a14 2
RewriteRule ^/project/([-a-zA-Z0-9_]+)$                   /project/$1/ [R,L]

d16 2
a17 4
RewriteRule ^/project/www/$                                /servlets/DomainHome?projectName=www [PT,L]
RewriteRule ^/project/([-a-zA-Z0-9_]+)/$                   /servlets/ProjectHome?projectName=$1 [PT,L]

RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*)/$         /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.vm&page=$2/index.html [PT,L]
d19 3
a21 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*\.[-a-zA-Z0-9]*)$   /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.vm&page=$2 [PT,L]
d23 1
a23 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*)/$              /servlets/ContentHelmNoodle?projectName=$1&page=$2/index.html [PT,L]
d25 3
a27 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*\.s?html?)$      /servlets/ContentHelmNoodle?projectName=$1&page=$2 [QSA,PT,L]
d29 1
a29 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*\.[-a-zA-Z0-9]+)$ /servlets/ContentHelmNoodle?projectName=$1&template=org/tigris/helm/publish/Binary.vm&page=$2 [PT,L]
d31 1
a31 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*)$               /project/$1/$2/ [R,L]
d39 1
a39 1
RewriteRule ^/$                                           /servlets/ProjectHome [PT,L]
d42 3
a44 2
RewriteCond %{HTTP_HOST} ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*)/$                                /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.vm&page=$1/index.html [PT,L]
a46 1

d48 1
a48 1
RewriteRule ^/nonav/(.*\.[-a-zA-Z0-9]*)$                   /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.vm&page=$1 [PT,L]
d50 3
a54 4
RewriteRule ^/nonav/(.*)$                                 /nonav/$1/ [R,L]

RewriteRule ^/(.*)/$                                      /servlets/ContentHelmNoodle?page=$1/index.html [PT,L]

d58 1
a58 4
RewriteRule ^/(.*\.[-a-zA-Z0-9]+)$                         /servlets/ContentHelmNoodle?template=org/tigris/helm/publish/Binary.vm&page=$1 [PT,L]

RewriteCond %{HTTP_HOST} ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/(.*)$                                       /$1/ [R,L]
@


1.19
log
@Added ability to track how users leave the site.

Instead of linking directly to href="http://www.somedomain.com/index.html",
a content developer can link to
href="/servlets/GoTo/http://www.somedomain.com/index.html"
and that will cause a hit to the apache server, which will be logged,
and then the user will be redirected to the link destination.

This trick is implemented as one mod_rewrite rule.
It does not use a servlet, it just uses the /servlets/ namespace to
reduce intrustion into the project URI space.
@
text
@d21 1
a21 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*)/$         /servlets/ContentHelmNoodle?projectName=$1&template=org/joist/publish/Binary.wm&page=$2/index.html [PT,L]
d23 1
a23 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*\.[-a-zA-Z0-9]*)$   /servlets/ContentHelmNoodle?projectName=$1&template=org/joist/publish/Binary.wm&page=$2 [PT,L]
d29 1
a29 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*\.[-a-zA-Z0-9]+)$ /servlets/ContentHelmNoodle?projectName=$1&template=org/joist/publish/Binary.wm&page=$2 [PT,L]
d43 1
a43 1
RewriteRule ^/nonav/(.*)/$                                /servlets/ContentHelmNoodle?template=org/joist/publish/Binary.wm&page=$1/index.html [PT,L]
d48 1
a48 1
RewriteRule ^/nonav/(.*\.[-a-zA-Z0-9]*)$                   /servlets/ContentHelmNoodle?template=org/joist/publish/Binary.wm&page=$1 [PT,L]
d59 1
a59 1
RewriteRule ^/(.*\.[-a-zA-Z0-9]+)$                         /servlets/ContentHelmNoodle?template=org/joist/publish/Binary.wm&page=$1 [PT,L]
@


1.18
log
@avoid trying to use a lowercase map -- apache has changed so that this
no longer works.  besides, it's not needed -- CHN can get the project name
from the request anyway.
@
text
@d2 5
@


1.17
log
@special case for the www project: rather than seeing ProjectHome,
visitors should see DomainHome
@
text
@a0 2
RewriteMap lowercase int:tolower

d38 1
a38 1
RewriteRule ^/nonav/(.*)/$                                /servlets/ContentHelmNoodle?projectName=${lowercase:%1}&template=org/joist/publish/Binary.wm&page=$1/index.html [PT,L]
d43 1
a43 1
RewriteRule ^/nonav/(.*\.[-a-zA-Z0-9]*)$                   /servlets/ContentHelmNoodle?projectName=${lowercase:%1}&template=org/joist/publish/Binary.wm&page=$1 [PT,L]
d54 1
a54 1
RewriteRule ^/(.*\.[-a-zA-Z0-9]+)$                         /servlets/ContentHelmNoodle?projectName=${lowercase:%1}&template=org/joist/publish/Binary.wm&page=$1 [PT,L]
@


1.17.6.1
log
@avoid trying to use a lowercase map -- apache has changed so that this
no longer works.  besides, it's not needed -- CHN can get the project name
from the request anyway.
@
text
@d1 2
d40 1
a40 1
RewriteRule ^/nonav/(.*)/$                                /servlets/ContentHelmNoodle?template=org/joist/publish/Binary.wm&page=$1/index.html [PT,L]
d45 1
a45 1
RewriteRule ^/nonav/(.*\.[-a-zA-Z0-9]*)$                   /servlets/ContentHelmNoodle?template=org/joist/publish/Binary.wm&page=$1 [PT,L]
d56 1
a56 1
RewriteRule ^/(.*\.[-a-zA-Z0-9]+)$                         /servlets/ContentHelmNoodle?template=org/joist/publish/Binary.wm&page=$1 [PT,L]
@


1.17.6.2
log
@port dprice's rewrite rule changes to the branch (with minor modifications)
@
text
@d16 12
a27 26
# The redirect rule for dirs w/o a trailing / is so that relative links from
# implicit index.html files will work (http://x.org/docs & http://x.org/docs/
# look different to a client when constructing absolute links from relative
# links)
RewriteCond %{REQUEST_URI}                                ^/project/([-a-zA-Z0-9_]+)/nonav/(.*[^/])$
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%2         -d
RewriteRule ^(.*)$                                        $1/ [R,L]

# $2 will never be led by a /
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/([^/].*)/$ /servlets/ContentHelmNoodle?projectName=$1&template=org/joist/publish/Binary.wm&page=$2/index.html [PT,L]
# $2 will never be led by a slash but may be empty
RewriteRule ^/+project/+([-a-zA-Z0-9_]+)/+nonav/+(.*)$    /servlets/ContentHelmNoodle?projectName=$1&template=org/joist/publish/Binary.wm&page=$2 [PT,L]

# again with the redirects...
RewriteCond %{REQUEST_URI}                                ^/project/([-a-zA-Z0-9_]+)/(.*[^/])$
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%2         -d
RewriteRule ^(.*)$                                        $1/ [R,L]

# $2 will never be led and always be followed by a /
RewriteRule ^/project/([-a-zA-Z0-9_]+)/([^/].*)/$      /servlets/ContentHelmNoodle?projectName=$1&page=$2/index.html [PT,L]

RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*\.s?html?)$  /servlets/ContentHelmNoodle?projectName=$1&page=$2 [QSA,PT,L]

# $2 will never be led by a slash but may be empty
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*)$           /servlets/ContentHelmNoodle?projectName=$1&template=org/joist/publish/Binary.wm&page=$2 [PT,L]
 
d37 2
a38 6
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.(__DOMAIN__)(:[0-9]*)?/nonav/(.*[^/])$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%4         -d
RewriteRule ^(/nonav.*)$                                 $1/ [R,L]
         
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.(__DOMAIN__)(:[0-9]*)?/nonav/([^/].*)/$ [NC]
RewriteRule ^/nonav/([^/].*)/$                           /servlets/ContentHelmNoodle?template=org/joist/publish/Binary.wm&page=$1/index.html [PT,L]
a40 2
RewriteCond %{HTTP_HOST}                                  ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*)$                               /servlets/ContentHelmNoodle?template=org/joist/publish/Binary.wm&page=$1 [PT,L]
d42 10
a51 5
# There's always data in %4 here since otherwise it would have been caught in
# the DomainHome & ProjectHome 50 lines or so above
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.(__DOMAIN__)(:[0-9]*)?/(.*[^/])$ [NC]
RewriteCond __SANDBOX__/data/helm/htdoc/%1/www/%4         -d
RewriteRule ^(.*)$                                        $1/ [R,L]
d53 2
a54 2
RewriteCond %{HTTP_HOST}%{REQUEST_URI}                    ^(.*)\.(__DOMAIN__)(:[0-9]*)?/([^/].*)/$ [NC]
RewriteRule ^/([^/].*)/$                                 /servlets/ContentHelmNoodle?page=$1/index.html [PT,L]
d56 2
a57 2
RewriteCond %{HTTP_HOST}                                  ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/([^/].*\.s?html?)$                         /servlets/ContentHelmNoodle?page=$1 [QSA,PT,L]
a58 2
RewriteCond %{HTTP_HOST}                                  ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/([^/].*)$                                  /servlets/ContentHelmNoodle?template=org/joist/publish/Binary.wm&page=$1 [PT,L]
@


1.16
log
@added pass through for file downloading
@
text
@d14 2
d33 3
@


1.15
log
@added ContentHelmNoodle and all of its associated files, also had to add a hook for ProxyModule to transform page name and support for alternative master templates
@
text
@d6 1
a6 1
RewriteRule ^(/(unbranded-.*|branding|sharedimages|icons|servlets|local-access-only)/.*)$       $1 [PT,L]
@


1.15.4.1
log
@added files to pass through to file downlaod via MDA or whatever, this was a change that has been in head for a while..
@
text
@d6 1
a6 1
RewriteRule ^(/(files|unbranded-.*|branding|sharedimages|icons|servlets|local-access-only)/.*)$       $1 [PT,L]
@


1.14
log
@allow hyphen in project names for the rewrite rules based around
/project/(name)/...
@
text
@d6 2
a7 1
RewriteRule ^(/(unbranded-.*|branding|sharedimages|icons|servlets)/.*)$       $1 [PT,L]
d16 1
a16 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*)/$         /$1/www/$2/index.html [PT,L]
d18 1
a18 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*\.[a-zA-Z0-9]*)$   /$1/www/$2 [PT,L]
d20 1
a20 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*)/$              /servlets/SecureView?projectName=$1&page=$2/index.html [PT,L]
d22 1
a22 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*\.s?html?)$      /servlets/SecureView?projectName=$1&page=$2 [QSA,PT,L]
d24 1
a24 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*\.[-a-zA-Z0-9]+)$ /$1/www/$2 [PT,L]
d35 1
a35 1
RewriteRule ^/nonav/(.*)/$                                /${lowercase:%1}/www/$1/index.html [PT,L]
d37 1
a37 1
#TODO, use SecureView even on non-branded html
d40 2
a41 1
RewriteRule ^/nonav/(.*\.[-a-zA-Z0-9]*)$                   /${lowercase:%1}/www/$1 [PT,L]
d46 1
a46 1
RewriteRule ^/(.*)/$                                      /servlets/SecureView?page=$1/index.html [PT,L]
d48 1
a48 1
RewriteRule ^/(.*\.s?html?)$                              /servlets/SecureView?page=$1 [QSA,PT,L]
d51 1
a51 1
RewriteRule ^/(.*\.[-a-zA-Z0-9]+)$                         /${lowercase:%1}/www/$1 [PT,L]
@


1.13
log
@prevent rewrites for /branding/ ...  another portion of the uri space,
gone -- perhaps this removes the need for sharedimages, though.
@
text
@d11 1
a11 1
RewriteRule ^/project/([a-zA-Z0-9_]+)$                   /project/$1/ [R,L]
d13 1
a13 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/$                   /servlets/ProjectHome?projectName=$1 [PT,L]
d15 1
a15 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/nonav/(.*)/$         /$1/www/$2/index.html [PT,L]
d17 1
a17 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/nonav/(.*\.[a-zA-Z0-9]*)$   /$1/www/$2 [PT,L]
d19 1
a19 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*)/$              /servlets/SecureView?projectName=$1&page=$2/index.html [PT,L]
d21 1
a21 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*\.s?html?)$      /servlets/SecureView?projectName=$1&page=$2 [QSA,PT,L]
d23 1
a23 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*\.[a-zA-Z0-9]+)$ /$1/www/$2 [PT,L]
d25 1
a25 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*)$               /project/$1/$2/ [R,L]
d39 1
a39 1
RewriteRule ^/nonav/(.*\.[a-zA-Z0-9]*)$                   /${lowercase:%1}/www/$1 [PT,L]
d49 1
a49 1
RewriteRule ^/(.*\.[a-zA-Z0-9]+)$                         /${lowercase:%1}/www/$1 [PT,L]
@


1.12
log
@move the rule for TLogin into a file which will be included before any of
the other components (cvsweb & issuezilla).
@
text
@d6 1
a6 1
RewriteRule ^(/(unbranded-.*|sharedimages|icons|servlets)/.*)$       $1 [PT,L]
@


1.11
log
@Resolved merge conflicts.
@
text
@a8 6
# a special case, for TLogin ... 'cause otherwise you can't ever log in
# unless you happen to be looking at something w/in /servlets/ 

RewriteRule /TLogin$ /servlets/TLogin [PT,L]

################
@


1.10
log
@corrected a typo, made /project/.../nonav/ rules look more like the
vhosted ones
@
text
@a2 1

d9 6
d17 1
a17 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/$                   /servlets/TView?project=$1&page=index.html [PT,L]
d19 1
a19 1
RewriteRule ^/project/([a-zA-Z0-9_]+)$                    /project/$1/ [R,L]
d25 1
a25 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*)/$              /servlets/TView?project=$1&page=$2/index.html [PT,L]
d27 1
a27 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*\.s?html?)$      /servlets/TView?project=$1&page=$2 [QSA,PT,L]
d34 1
a34 1
# vhosted access to project pages
d36 2
a37 2
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/$                                           /servlets/TView?project=${lowercase:%1}&page=index.html [PT,L]
d39 1
a39 1
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__(:[0-9]*)?$ [NC]
d42 3
a44 1
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__(:[0-9]*)?$ [NC]
d47 1
a47 1
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__(:[0-9]*)?$ [NC]
d50 1
a50 2
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/(.*)/$                                      /servlets/TView?project=${lowercase:%1}&page=$1/index.html [PT,L]
d52 1
a52 2
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/(.*\.s?html?)$                              /servlets/TView?project=${lowercase:%1}&page=$1 [QSA,PT,L]
d54 1
a54 1
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__(:[0-9]*)?$ [NC]
d57 1
a57 28
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/(.*)$                                       /$1/ [R,L]

################
# vhosted access to project pages defaulting to project www

RewriteCond %{HTTP_HOST} ^__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/$                                           /servlets/TView?project=www&page=index.html [PT,L]

RewriteCond %{HTTP_HOST} ^__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*)/$                                /www/www/$1/index.html [PT,L]

RewriteCond %{HTTP_HOST} ^__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*\.[a-zA-Z0-9]*)$                   /www/www/$1 [PT,L]

RewriteCond %{HTTP_HOST} ^__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*)$                                 /nonav/$1/ [R,L]

RewriteCond %{HTTP_HOST} ^__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/(.*)/$                                      /servlets/TView?project=www&page=$1/index.html [PT,L]

RewriteCond %{HTTP_HOST} ^__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/(.*\.s?html?)$                              /servlets/TView?project=www&page=$1 [QSA,PT,L]

RewriteCond %{HTTP_HOST} ^__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/(.*\.[a-zA-Z0-9]+)$                         /www/www/$1 [PT,L]

RewriteCond %{HTTP_HOST} ^__DOMAIN__(:[0-9]*)?$ [NC]
@


1.9
log
@corrected minor typo
@
text
@d16 3
a18 1
RewriteRule ^/project/([a-zA-Z0-9_]+)/nonav/(.*)$         /$1/www/$2 [PT,L]
d38 1
a38 1
RewriteRule ^/nonav/(.*\.[a-zA-Z0-9])$                    /${lowercase:%1}/www/$1 [PT,L]
d65 1
a65 1
RewriteRule ^/nonav/(.*\.[a-zA-Z0-9])$                    /www/www/$1 [PT,L]
@


1.8
log
@now redirects to add a slash
significant cleanup and reformating
@
text
@d57 1
a57 1
RewriteRule ^/$                                           /servlets/TView?project=$www&page=index.html [PT,L]
@


1.7
log
@added www as default vhost added support for ports in RewriteConds
@
text
@d2 41
a42 3
RewriteRule ^/project/([a-zA-Z0-9_]+)/nonav/(.*)$      /$1/www/$2 [PT]
RewriteRule ^/project/([a-zA-Z0-9_]+)/api/(.*)$        /$1/www/api/$2 [PT]
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*)/api/(.*)$   /$1/www/$2/api/$3 [PT]
d45 1
a45 3
RewriteRule ^/nonav/(.*)/$          /${lowercase:%1}/www/$1/index.html [PT]
RewriteCond %{HTTP_HOST} ^__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*)/$          /www/www/$1/index.html [PT]
d48 1
a48 3
RewriteRule ^/nonav/(.*)$    /${lowercase:%1}/www/$1 [PT]
RewriteCond %{HTTP_HOST} ^__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*)$    /www/www/$1 [PT]
d51 5
a55 1
RewriteRule ^/(.*/api/.*)$          /${lowercase:%1}/www/$1 [PT]
d57 1
a57 1
RewriteRule ^/(.*/api/.*)$          /www/www/$1 [PT]
d59 2
a60 7
RewriteRule ^(/(unbranded-.*|sharedimages|icons)/.*)$       $1 [PT]
RewriteRule ^/project/([a-zA-Z0-9_]+)$                 /servlets/TView?project=$1&page=index.html [PT]
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*)/$           /servlets/TView?project=$1&page=$2/index.html [PT]
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*\.s?html?)$    /servlets/TView?project=$1&page=$2 [QSA,PT]
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*\.[a-zA-Z0-9]+)$    /$1/www/$2 [PT]
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*)$            /servlets/TView?project=$1&page=$2/index.html [PT]
RewriteRule ^(.*/)$                 /servlets/TView?page=$1/index.html [PT]
d62 2
d65 2
a66 2
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^(/.*\.s?html?)$         /servlets/TView?project=${lowercase:%1}&page=$1 [QSA,PT]
d69 1
a69 1
RewriteRule ^(/.*\.s?html?)$         /servlets/TView?project=www&page=$1 [QSA,PT]
d71 2
a72 1
RewriteRule ^(/.*\.s?html?)$         /servlets/TView?page=$1 [QSA,PT]
d74 2
a75 1
RewriteRule ^/([A-Za-z0-9_]+)$      /servlets/$1 [PT]
a76 2
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__(:[0-9]*)?$ [NC]
RewriteRule ^/(.*)$      /${lowercase:%1}/www/$1 [PT]
d78 2
a79 1
RewriteRule ^/(.*)$      /www/www/$1 [PT]
@


1.6
log
@fix rewriterules, which require RewriteMap for dynamic vhosting
PR:
Obtained from:
Submitted by:
Reviewed by:
@
text
@d6 1
a6 1
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__$ [NC]
d8 2
d11 4
a14 2
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__$ [NC]
RewriteRule ^/nonav/(.*\.html?)$    /${lowercase:%1}/www/$1 [PT]
d16 1
a16 4
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__$ [NC]
RewriteRule ^/nonav/(.*\.shtml)$    /${lowercase:%1}/www/$1 [PT]

RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__$ [NC]
d18 2
a20 1
RewriteRule ^(/bugs)$               $1 [PT]
d23 3
a25 3
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*/)$           /servlets/TView?project=$1&page=$2/index.html [PT]
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*\.html?)$    /servlets/TView?project=$1&page=$2 [QSA,PT]
RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*\.shtml)$    /servlets/TView?project=$1&page=$2 [QSA,PT]
a28 2
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__$ [NC]
RewriteRule ^/(.*\.js)$            /${lowercase:%1}/www/$1 [PT]
d30 8
a37 2
RewriteRule ^(/.*\.html?)$         /servlets/TView?page=$1 [QSA,PT]
RewriteRule ^(/.*\.shtml)$         /servlets/TView?page=$1 [QSA,PT]
d40 1
a40 1
RewriteCond %{HTTP_HOST} ^(.*).__DOMAIN__$ [NC]
d42 2
@


1.5
log
@noodlization
@
text
@d1 1
@


1.4
log
@support either method of bugzilla usage (with or without noodle)
@
text
@a0 10
# This is where you can add apache directives to be processed before the first 
# virtual host.

ServerAdmin webmaster@@__DOMAIN__
DocumentRoot __HTDOC_ROOT__
ServerName __DOMAIN__
#ErrorLog logs/novhost-error.log
#CustomLog logs/nohost-access.log common

RewriteMap lowercase int:tolower
d18 1
a18 1
RewriteRule ^(/(bugs|bugs-.*|sharedimages|source|search)/.*)$       $1 [PT]
@


1.3
log
@fix rewrite rule for source browsing
@
text
@d28 1
a28 1
RewriteRule ^(/(bugs-.*|sharedimages|source|search)/.*)$               $1 [PT]
@


1.2
log
@correct use of rewrite map (used so that the vhost will be treated
in a case insensitive-manner wrt clients).
@
text
@d28 1
a28 1
RewriteRule ^(/(bugs-.*|sharedimages||source|search)/.*)$               $1 [PT]
@


1.1
log
@big changes as part of the conf file rationalization.   everything in
data/helm/apache is obsolete now (so ApacheConfig is unneeded, though
it hasn't been removed yet).  the apache conf files are now installed in
a new location, and they are fairly different: instead of vhosts,
we use rewritecond to support dynamic virtual hosts.   the file in
helm/perl/cgi/local was moved up to helm/perl/cgi
@
text
@d10 1
d16 1
a16 1
RewriteRule ^/nonav/(.*)/$          /%{tolower:%1}/www/$1/index.html [PT]
d19 1
a19 1
RewriteRule ^/nonav/(.*\.html?)$    /%{tolower:%1}/www/$1 [PT]
d22 1
a22 1
RewriteRule ^/nonav/(.*\.shtml)$    /%{tolower:%1}/www/$1 [PT]
d25 1
a25 1
RewriteRule ^/(.*/api/.*)$          /%{tolower:%1}/www/$1 [PT]
d37 1
a37 1
RewriteRule ^/(.*\.js)$            /%{tolower:%1}/www/$1 [PT]
d44 1
a44 1
RewriteRule ^/(.*)$      /%{tolower:%1}/www/$1 [PT]
@


1.1.1.1
log
@Merging newhelm tree into helm, as per IZ issue #557.  Previous major version of helm is tagged TIGRIS_NOV_11_2000.
@
text
@d1 2
a2 1
RewriteMap lowercase int:tolower
d4 37
a40 56
################
# reserved sections of the URI space for components

RewriteRule ^(/(unbranded-.*|sharedimages|icons|servlets)/.*)$       $1 [PT,L]

################
# a special case, for TLogin ... 'cause otherwise you can't ever log in
# unless you happen to be looking at something w/in /servlets/ 

RewriteRule /TLogin$ /servlets/TLogin [PT,L]

################
# non-vhosted access to project pages

RewriteRule ^/project/([a-zA-Z0-9_]+)$                   /project/$1/ [R,L]

RewriteRule ^/project/([a-zA-Z0-9_]+)/$                   /servlets/ProjectHome?projectName=$1 [PT,L]

RewriteRule ^/project/([a-zA-Z0-9_]+)/nonav/(.*)/$         /$1/www/$2/index.html [PT,L]

RewriteRule ^/project/([a-zA-Z0-9_]+)/nonav/(.*\.[a-zA-Z0-9]*)$   /$1/www/$2 [PT,L]

RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*)/$              /servlets/SecureView?projectName=$1&page=$2/index.html [PT,L]

RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*\.s?html?)$      /servlets/SecureView?projectName=$1&page=$2 [QSA,PT,L]

RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*\.[a-zA-Z0-9]+)$ /$1/www/$2 [PT,L]

RewriteRule ^/project/([a-zA-Z0-9_]+)/(.*)$               /project/$1/$2/ [R,L]

################
# vhosted access to project pages, vhost name detected in HelmServlet

RewriteRule ^/$                                           /servlets/ProjectHome [PT,L]
# note, instances may want to add a special rewrite rule for the domain haome page

RewriteCond %{HTTP_HOST} ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*)/$                                /${lowercase:%1}/www/$1/index.html [PT,L]

#TODO, use SecureView even on non-branded html

RewriteCond %{HTTP_HOST} ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*\.[a-zA-Z0-9]*)$                   /${lowercase:%1}/www/$1 [PT,L]

RewriteCond %{HTTP_HOST} ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/nonav/(.*)$                                 /nonav/$1/ [R,L]

RewriteRule ^/(.*)/$                                      /servlets/SecureView?page=$1/index.html [PT,L]

RewriteRule ^/(.*\.s?html?)$                              /servlets/SecureView?page=$1 [QSA,PT,L]

RewriteCond %{HTTP_HOST} ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/(.*\.[a-zA-Z0-9]+)$                         /${lowercase:%1}/www/$1 [PT,L]

RewriteCond %{HTTP_HOST} ^(.*)\.(__DOMAIN__)(:[0-9]*)?$ [NC]
RewriteRule ^/(.*)$                                       /$1/ [R,L]
d42 2
@


1.1.1.2
log
@Replacing the HEAD with the HELM_PEER_PORT_BRANCH.
@
text
@d6 1
a6 1
RewriteRule ^(/(files|unbranded-.*|branding|sharedimages|icons|servlets|local-access-only)/.*)$       $1 [PT,L]
d8 5
d17 1
a17 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)$                   /project/$1/ [R,L]
d19 1
a19 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/$                   /servlets/ProjectHome?projectName=$1 [PT,L]
d21 1
a21 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*)/$         /servlets/ContentHelmNoodle?projectName=$1&template=org/joist/publish/Binary.wm&page=$2/index.html [PT,L]
d23 1
a23 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/nonav/(.*\.[-a-zA-Z0-9]*)$   /servlets/ContentHelmNoodle?projectName=$1&template=org/joist/publish/Binary.wm&page=$2 [PT,L]
d25 1
a25 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*)/$              /servlets/ContentHelmNoodle?projectName=$1&page=$2/index.html [PT,L]
d27 1
a27 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*\.s?html?)$      /servlets/ContentHelmNoodle?projectName=$1&page=$2 [QSA,PT,L]
d29 1
a29 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*\.[-a-zA-Z0-9]+)$ /servlets/ContentHelmNoodle?projectName=$1&template=org/joist/publish/Binary.wm&page=$2 [PT,L]
d31 1
a31 1
RewriteRule ^/project/([-a-zA-Z0-9_]+)/(.*)$               /project/$1/$2/ [R,L]
d40 1
a40 1
RewriteRule ^/nonav/(.*)/$                                /servlets/ContentHelmNoodle?projectName=${lowercase:%1}&template=org/joist/publish/Binary.wm&page=$1/index.html [PT,L]
d42 1
a42 1
#TODO, use SecureView or helm noodle even on non-branded html
d45 1
a45 2
RewriteRule ^/nonav/(.*\.[-a-zA-Z0-9]*)$                   /servlets/ContentHelmNoodle?projectName=${lowercase:%1}&template=org/joist/publish/Binary.wm&page=$1 [PT,L]

d50 1
a50 1
RewriteRule ^/(.*)/$                                      /servlets/ContentHelmNoodle?page=$1/index.html [PT,L]
d52 1
a52 1
RewriteRule ^/(.*\.s?html?)$                              /servlets/ContentHelmNoodle?page=$1 [QSA,PT,L]
d55 1
a55 1
RewriteRule ^/(.*\.[-a-zA-Z0-9]+)$                         /servlets/ContentHelmNoodle?projectName=${lowercase:%1}&template=org/joist/publish/Binary.wm&page=$1 [PT,L]
@


