From: Paul Hartman <paul.hartman+gentoo@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] [Apache HTTPD] Why doesn't my RewriteRule fire?
Date: Mon, 22 Aug 2011 16:31:45 -0500 [thread overview]
Message-ID: <CAEH5T2O9HPHx5bHBNbLJwmdvOxsbJH-QCTMMfbLO3EVv99bppw@mail.gmail.com> (raw)
In-Reply-To: <CAE1pOi3oHj5yO88=KtA1KUstne9w8GxDfEgTKz55Aks1BtZr4w@mail.gmail.com>
On Mon, Aug 22, 2011 at 4:07 PM, Hilco Wijbenga
<hilco.wijbenga@gmail.com> wrote:
> RewriteRule ^/website$ http://localhost/website/ [T]
> ProxyPassMatch ^/website/(.*)$
> http://localhost:8000/website/$1
> </VirtualHost>
>
> The ProxyPassMatch fires but (AFAICT) the RewriteRule does not. I.e.
> http://localhost/website (no slash) ==> 404 (in fact, it's trying to
> serve /var/www/localhost/htdocs/website) but http://localhost/website
> (with slash) ==> works.
Disclaimer: I am not an Apache guru :)
You have [T] as third parameter to RewriteRule, which is used to
specify a MIME type, but you're not specifying anything. Maybe that
invalidates the rule. Try removing it.
You can also specify multiple RewriteRules which are processed in
sequence, if trailing slash works maybe you need to first add a rule
convert URL with no slash to URL with slash:
RewriteRule ^/website$ /website/ [R]
next prev parent reply other threads:[~2011-08-22 21:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 21:07 [gentoo-user] [Apache HTTPD] Why doesn't my RewriteRule fire? Hilco Wijbenga
2011-08-22 21:31 ` Paul Hartman [this message]
2011-08-22 22:13 ` Hilco Wijbenga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAEH5T2O9HPHx5bHBNbLJwmdvOxsbJH-QCTMMfbLO3EVv99bppw@mail.gmail.com \
--to=paul.hartman+gentoo@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox