Jim, Thank you. That worked really well. As a side note, are there resources you would recommend to help me with this type of task? Jeff Jeffrey Poling System Administrator | Information Systems Moody Bible Institute 820 N. LaSalle Blvd., Chicago, IL 60610 312-329-8968 www.moodyministries.net >From the Word. To Life. -----Original Message----- From: Jim Riggs [mailto:apache-lists@xxxxxxxx] Sent: Tuesday, January 04, 2011 10:53 AM To: users@xxxxxxxxxxxxxxxx; Jeff Poling Subject: Re: Rewrite rules On Jan 4, 2011, at 10:22 AM, Jeff Poling wrote: > I am very new to apache configuration, having inherited responsibility for it this fall. I need some assistance with (hopefully) a simple rewrite rule. > > We are using apache in a reverse proxy configuration. For a URL like: > > http://www.mydomain.com/site/test > > I want to rewrite it as https://www.mydomain.com/site/test > > The trick is that "site" could be any number of different strings. What regular expression do I need to use to make this work? If it's a fixed list, something like this should work: RewriteCond %{HTTPS} !=on RewriteRule "^(/(site|foo|bar|baz)/test.*)$" "https://%{HTTP_HOST}$1" [NC,R,L] Or, for /<anything>/test: RewriteCond %{HTTPS} !=on RewriteRule "^(/[^/]+/test.*)$" "https://%{HTTP_HOST}$1" [NC,R,L] --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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