On 6/28/06, Rob Wilkerson <r.d.wilkerson@xxxxxxxxx> wrote:
First let me say that I hope this is the proper mailing list for my question. If that's not the case, please redirect me and I'll be happy to post there. I'm taking over an application that currently includes an Apache module written to redirect web traffic to one or more virtual hosts. In looking at what it does, I'm wondering whether I can accomplish the same thing with mod_rewrite and not have to worry about: 1) rebuilding the module for each version of Apache and 2) compiling for multiple versions on multiple platforms (windows, linux, solaris - currently). Here's what the module does (and, consequently, what I need
mod_rewrite to do):
1. Operate within one or more virtual hosts, but not necessarily
within others
2. By default, redirect all incoming traffic to a single point of entry (e.g. mylandingpage.php) which will then redirect as needed 3. Forward the originally requested URL to the landing page (this is the part that might be the killer). Our current module writes a request header with this info that is read by the landing page.
What do you mean by "writes a request header"? Is it proxying the requests, or redirecting them? It can't modify the client's request headers if it is redirecting. You can certainly do this easily by passing the original URL in the query string, which would be visible to the client. If that is acceptable, then I don't see anything here that can't be done by mod_rewrite. Joshua.
Hey, Joshua - Actually, that's exactly what the module is doing. It accepts the incoming request, writes a custom header (x-se-path) whose value is the URI of the incoming request and then redirects that request to the landing page. The landing page then does its work and includes the content of the document at the original URI. Although it's not necessary to forward that original request URI in a request header, per se, the one location that *can't* be used to forward the URI is the query string. For this product, the URI is sort of sacred for usability, readability and SEO reasons. Is there any Apache and/or mod_rewrite functionality that might get the job done another way? Thanks again. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx -- Rob Wilkerson --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx