Apache: sending secure content to SSL vHost
Posted: 10/16/2001 10:11:55 AMBy: Comfortably Anonymous
Times Read: 2,554
Likes: 0 Dislikes: 0
Topic: Internet and WWW
RewriteEngine On
RewriteCond %{REQUEST_URI} (^/some/directory(.*)$) [NC]
RewriteRule ^/(.*)$ https://www.somewhere.com/$1 [R]
If you want to send ALL requests to the port 80 vHost, then delete/comment out the RewriteCond line. If you need multiple directories, add additional RewriteCond directives, with [OR,NC] on the end of each, instead of just [NC].
RewriteCond %{REQUEST_URI} (^/some/directory(.*)$) [NC]
RewriteRule ^/(.*)$ https://www.somewhere.com/$1 [R]
If you want to send ALL requests to the port 80 vHost, then delete/comment out the RewriteCond line. If you need multiple directories, add additional RewriteCond directives, with [OR,NC] on the end of each, instead of just [NC].
Rating: (You must be logged in to vote)