httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chet Luther" <>
Subject [mod_rewrite] Problems with an initially empty URL.
Date Fri, 05 Apr 2002 00:12:40 GMT
    First off, my relevant information:  Apache 1.3.22 (Using this version
because of single cookie bug in 23/24.) on Solaris 8.
    I am attempting to proxy a PeopleSoft web application that has the
annoying habit of constructing escaped HREF and SRC attributes like such:

    This causes my rewrite rules to treat it as a relative URL although it
should really be absolute.  These improperly escaped URLs end up getting
rewritten into something like this:


The relevant portion of my httpd.conf:

> ServerName
> Listen 8800
> CustomLog /path/to/apache/logs/custom.log "\n%p) %U%q\n%p) %{REWRITE}e\n"
> TransferLog /path/to/apache/logs/custom.log
> RewriteEngine On
> RewriteRule ^(.*)$ $1 [E=REWRITE:$1]
> RewriteRule ^/(.*)$  to://$1
> RewriteRule ^to://([^/]+)/(.*)   http://$1/$2 [E=SERVER:$1,P,L]
> RewriteRule .*  -  [F]
> ProxyRequests On
> NoCache *
> ProxyPassReverse /

An example log snippet showing the empty URL string mod_rewrite is seeing.
The top line is generated by the TransferLog directive, and the bottom by
the RewriteLog.

> 443)
> 443) -

An example log snippet of a URL that wasn't escaped:

> 443) /servlets/iclientservlet/peoplesoft8portal/
> 443) /servlets/iclientservlet/peoplesoft8portal/

    My first reaction would be to just add another rewrite rule to properly
rewrite in this case, but I can't rewrite a URL that doesn't exist.  Any
suggestions would be very welcome.

Thanks in advance,

Chet Luther

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message