help with a RewriteRule

This is a discussion on help with a RewriteRule within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, I need to put together a rewriterule that will do the following: Incoming URL: http://www.mysite.com/redir/...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-16-2003
David Orriss Jr
 
Posts: n/a
Default help with a RewriteRule

Hi,

I need to put together a rewriterule that will do the following:

Incoming URL: http://www.mysite.com/redir/http://www.yoursite.com/

Proxied to: http://www.yoursite.com

I can get this to work:

http://www.mysite.com/redir/www.yoursite.com/

With this rule:

RewriteRule ^/redir/(.*) http://$1 [P]

But I need to include the 'http' in the URL string.

I thought this might work but it didn't:

RewriteRule ^/redir/http://(.*) http://$1

Suggestions? Thanks!



  #2 (permalink)  
Old 07-16-2003
David Orriss Jr
 
Posts: n/a
Default Re: help with a RewriteRule

OK.. I spoke to soon..

This rule works, but instead of proxying, it does a rewrite:

RewriteRule ^/redir/http://(.*) http://$1 [P]

And I have a ProxyPassReverse statement for the URL I'm redirecting from.

Assistance/insights would still be appreciated. Thanks again.


 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:18 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0