Created
November 21, 2016 15:20
-
-
Save russellmatbouli/94e74eb52595c166f4707825ef771faf to your computer and use it in GitHub Desktop.
Bugzilla PROJECT rewrite rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This set of directives sets the PROJECT environment variable. | |
# Bugzilla uses this to switch configurations for multiple databases | |
# It matches a request url for a subdirectory called project, then sets | |
# the value of ENV{PROJECT} to the next directory (alphanumeric only). | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} "^(.*)project" | |
RewriteRule "project/([a-zA-Z0-9_]+?)/(.*)$" "%1$2" [E=PROJECT:$1] | |
SetEnvIfExpr "env('REDIRECT_PROJECT') =~ /^([a-zA-Z0-9_]+)$/" PROJECT=$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment