[Bug 29193] Numeric bug alias
wine-bugs at winehq.org
wine-bugs at winehq.org
Mon Nov 28 20:15:52 CST 2011
http://bugs.winehq.org/show_bug.cgi?id=29193
--- Comment #6 from Dan Kegel <dank at kegel.com> 2011-11-28 20:15:52 CST ---
So don't use mod_rewrite. You could do it with
ScriptAliasMatch ^/bug[1-9][0-9]* /usr/lib/cgi-bin/foo.sh
and a cgi-bin script like
#!/bin/sh
bad_input() {
echo "Status: 404 Not found"
echo ""
echo "The requested URL could not be found."
exit 0
}
redirect_to() {
echo "Status: 301 Moved"
echo "Location: $1"
echo "Content-type: text/plain"
echo ""
echo "Redirecting you to $1 now."
exit 0
}
case "$REQUEST_URI" in
/bug*) bugnum="${REQUEST_URI#/bug}";;
*) bad_input ;;
esac
case "$bugnum" in
[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9])
redirect_to "http://bugs.winehq.org/show_bug.cgi?id=$bugnum" ;;
*) bad_input ;;
esac
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list