Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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@ [P,L]
RewriteRule ^/cam1 [E=Authorization:Basic\ YWRtaW46YWRtaW4=,P,L]
RewriteRule ^/cam1 [E=HTTP_USERID:admin,E=HTTP_PASSWORD:admin,P,L]`

Anybody have any other ideas?

share|improve this question

Try to remove ^ and /:

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

Please tell me if it works.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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