Charles Payne (Travel Channel) wrote:
Guys,I have an issue that I can seems to find online. I have a mod_rewrite rule that looks like thisRewriteRule ^/test http://myother.webserver.com [R]But what I want to do is anything that is a part of the directory /test I want it to go to the other server.Can I do something like thing RewriteRule ^/test* http://tdocs.travelchannel.com/teams/Login.doSorry this might be an easy question but I can seem to find a straight answer on google.Thanks
The first component of a RewriteRule is a regex, so something like this should get you there (you were close).
RewriteRule ^/test.* http://tdocs.travelchannel.com/teams/Login.doNow, this will redirect anything that starts with /test, so if you want to make sure the request is a directory, you can make it stricter as follows:
RewriteRule ^/test/.* http://tdocs.travelchannel.com/teams/Login.do Justin Pasher --------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx