old-www/LDP/bugzilla/Bugzilla-Guide/rewrite.html

208 lines
3.0 KiB
HTML

<HTML
><HEAD
><TITLE
>Apache
mod_rewrite
magic</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="The Bugzilla Guide - 2.16.3 Release"
HREF="index.html"><LINK
REL="UP"
TITLE="Useful Patches and Utilities for Bugzilla"
HREF="patches.html"><LINK
REL="PREVIOUS"
TITLE="Useful Patches and Utilities for Bugzilla"
HREF="patches.html"><LINK
REL="NEXT"
TITLE="Command-line Bugzilla Queries"
HREF="cmdline.html"></HEAD
><BODY
CLASS="section"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Bugzilla Guide - 2.16.3 Release</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="patches.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Appendix C. Useful Patches and Utilities for Bugzilla</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="cmdline.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="rewrite"
></A
>C.1. Apache
<TT
CLASS="filename"
>mod_rewrite</TT
>
magic</H1
><P
>Apache's
<TT
CLASS="filename"
>mod_rewrite</TT
>
module lets you do some truly amazing things with URL rewriting. Here are
a couple of examples of what you can do.</P
><P
></P
><OL
TYPE="1"
><LI
><P
>Make it so if someone types
<TT
CLASS="computeroutput"
>http://www.foo.com/12345</TT
>
, Bugzilla spits back http://www.foo.com/show_bug.cgi?id=12345. Try
setting up your VirtualHost section for Bugzilla with a rule like
this:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;&#60;VirtualHost 12.34.56.78&#62;
RewriteEngine On
RewriteRule ^/([0-9]+)$ http://foo.bar.com/show_bug.cgi?id=$1 [L,R]
&#60;/VirtualHost&#62;
</PRE
></FONT
></TD
></TR
></TABLE
></LI
><LI
><P
>There are many, many more things you can do with mod_rewrite.
Please refer to the mod_rewrite documentation at
<A
HREF="http://www.apache.org"
TARGET="_top"
>http://www.apache.org</A
>.
</P
></LI
></OL
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="patches.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="cmdline.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Useful Patches and Utilities for Bugzilla</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="patches.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Command-line Bugzilla Queries</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>