Blog

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
...
# In the case you have to debug the rules
#RewriteLog#LogLevel alert
#LogLevel info rewrite:trace6
#LogLevel alert rewrite:trace3
#OLD APACHE: RewriteLog "/tmp/rewrite.log"
#RewriteLogLevel#OLD APACHE: RewriteLogLevel 5
#The mappingfile (must not be in a Directory entry)
RewriteMap bugzillajiramap "txt:/etc/apache2/bugzilla-jira-map.txt"
...
#Our Bugzilla Directory entry
<Directory /home/smartics/public_html/bugzilla/>
   AddHandler cgi-script .cgi
   Options +Indexes +ExecCGI +FollowSymLinks
   DirectoryIndex index.cgi
   AllowOverride Limit
   AddType application/vnd.mozilla.xul+xml .xul
   AddType application/rdf+xml .rdf
   RewriteEngine on
# Grep the ID from the Query_String and store in Variable 1.
   RewriteCond %{QUERY_STRING} "id=(.*)$"
# Check if ID is in the specified text file. Only when found continue with RewriteRule.
   RewriteCond ${bugzillajiramap:%1|NOTFOUND} !NOTFOUND [NC]
   RewriteRule "^show_bug.cgi" "https://www.smartics.eu/jira/browse/${bugzillajiramap:%1|NOTFOUND}"
</Directory>

...

...