I'm trying to use modrewrite to proxy http://myserver/cam1 to an internal, http-auth protected server at http://admin:admin@192.168.99.130/cgi/mjpg/mjpg.cgi

No matter what I try, though, requests to http://myserver/cam1 always prompt me for the username and password. I've tried all of these to no avail.

RewriteRule ^/cam1 http://admin:admin@192.168.99.130/cgi/mjpg/mjpg.cgi [P,L]
RewriteRule ^/cam1 http://192.168.99.130/cgi/mjpg/mjpg.cgi [E=Authorization:Basic\ YWRtaW46YWRtaW4=,P,L]
RewriteRule ^/cam1 http://192.168.99.130/cgi/mjpg/mjpg.cgi [E=HTTP_USERID:admin,E=HTTP_PASSWORD:admin,P,L]`

Anybody have any other ideas?

link|improve this question
feedback

1 Answer

Try to remove ^ and /:

RewriteRule cam1 http://admin:admin@192.168.99.130/cgi/mjpg/mjpg.cgi [P,L]
RewriteRule cam1 http://192.168.99.130/cgi/mjpg/mjpg.cgi [E=Authorization:Basic\ YWRtaW46YWRtaW4=,P,L]
RewriteRule cam1 http://192.168.99.130/cgi/mjpg/mjpg.cgi [E=HTTP_USERID:admin,E=HTTP_PASSWORD:admin,P,L]

Please tell me if it works.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.