You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mark-Nathaniel Weisman <ma...@outlander.us> on 2002/11/27 09:33:41 UTC

[users@httpd] Redirects?

Hello All,
  I've got a code snippet below that I'm using for my redirect on my
apache webserver. What's wrong with this, the code grabs as I get a
"Page not found" on my browser when I try using the name instead of the
IP Address. If I use the IP Address in place of the name on the first
line, it works fine, it's like the second line isn't working, any help?
---
RewriteEngine on
RewriteLogLevel 0

RewriteRule     ^/mail$ http://www.example.org/mail/ [R]
RewriteRule     ^/mail/$ http://192.168.0.2/ [P]
RewriteRule     ^/mail/(.*)$ http://192.168.0.2/$1 [P,L]

ProxyRequests        on
NoCache              *
ProxyPassReverse  /mail/  http://192.168.0.2/
---
Any and all help would be greatly appreciated.

His faithful servant,
Mark


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirects?

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 26 Nov 2002, Mark-Nathaniel Weisman wrote:

> Hello All,
>   I've got a code snippet below that I'm using for my redirect on my
> apache webserver. What's wrong with this, the code grabs as I get a
> "Page not found" on my browser when I try using the name instead of the
> IP Address. If I use the IP Address in place of the name on the first
> line, it works fine, it's like the second line isn't working, any help?
> ---
> RewriteEngine on
> RewriteLogLevel 0
>
> RewriteRule     ^/mail$ http://www.example.org/mail/ [R]
> RewriteRule     ^/mail/$ http://192.168.0.2/ [P]
> RewriteRule     ^/mail/(.*)$ http://192.168.0.2/$1 [P,L]

> ProxyRequests        on
Why is this set?  It should be OFF for a reverse proxy, unless you want to
make yourself an open proxy server for all the world to abuse.

For your other problem, the obvious question is, does
http://www.example.org/mail/ work when you type it in your browser?

Joshua.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org