[thelist] mod_rewrite redirect to external URL

Tim Beadle tim.beadle at iop.org
Tue Jul 27 07:46:33 CDT 2004


On Tue, 2004-07-27 at 04:40, Maximillian Von Schwanekamp wrote:
> How can I use mod_rewrite to redirect something like this:
> /mydirectory -> http://otherdomain.com/some/arbitrary/file.htm
> /* -> http://otherdomain.com/
> 
> For the first one, this works fine:
> RewriteRule ^mydirectory(.*) http://otherdomain.com/some/arbitrary/file.htm

Maximillian,

Take a look at RewriteCond - I think it will help:
http://www.engelschall.com/pw/apache/rewriteguide/

HTH,

Tim
-- 
Tim Beadle, Information Systems Developer
Institute of Physics Publishing
Dirac House, Temple Back
Bristol BS1 6BE, UK
tel +44 (0)117 930 1262
<tim.beadle at iop.org>
http://iop.org/


More information about the thelist mailing list