Problem with mod_rewrite proxy for .asp DirectoryIndex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all:

Apache 2.2.4   RHEL4

I have the following 4 rules:
-----
Options +ExecCGI +FollowSymLinks +Includes +Indexes +MultiViews -SymLinksIfOwnerMatch
DirectoryIndex  index.shtml index.shtm index.html default.htm default.asp index.asp index.htm default.html default.aspx home.htm home.html index.cgi index.pl

# proxy directives for .ASP files
RewriteRule      (.*.asp*)$  http://192.168.166.120:8080$1  [Proxy,NoSubReq]
ProxyPassReverse /           http://192.168.166.120:8080
-----



It works great for the most part, proxying the ASP requests over my
IIS server, EXPECT when the ASP file is in the DirectoryIndex.


With NoSubReq

1) If I browse to http://127.0.0.0/sbirl/ASP/  I get the ASP source
   code

2) If I browse to http://127.0.0.1/sbirl/ASP/default.asp, it proxies
   like it should


Without NoSubReq

3) If I browse to http://127.0.0.0/sbirl/  mod_rewrite tries to proxy
   http://127.0.0.0/sbirl/ASP/default.asp  as
   http://192.168.166.120/sbirl/default.asp -- giving back a proper 404




I tried changing to NoSubReq to DPI, but Apache configtest complained
that DPI was invalid as a RewriteRule flag


I tried
RewriteCond ! %{IS_SUBREQ}
RewriteRule      (.*.asp*)$  http://192.168.166.120:8080$1  [Proxy]
ProxyPassReverse /           http://192.168.166.120:8080


But that failed to pass to proxy any ASP requests.


The question is, how I fix #1 and retain #2 at the same time?




Thanks
 S.A. Birl
 http://concept.temple.edu/

Please do not CC me responses to my own posts. I'll read the responses
from the list.

Apache archives  http://mail-archives.apache.org/mod_mbox/httpd-users/


---------------------------------------------------------------------
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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux