sangfroid wrote:
Hi,
I have two webpages...
1. www.mypage.com and
2. www.mypage.com/private
The issue that I am having is, I need to redirect all http requests coming
to http://www.mypage.com/private to https://www.mypage.com
However, I don't want the requests coming to http://www.mypage.com to be
redirected to https://www.mypage.com.
How do I accomplish it ?
I will highly appreciate your suggestions..Thanks..
Simplest solution is the Redirect directive:
From http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect :
The Redirect directive maps an old URL into a new one by asking the
client to refetch the resource at the new location.
The old /URL-path/ is a case-sensitive (%-decoded) path beginning
with a slash. A relative path is not allowed. The new /URL/ should
be an absolute URL beginning with a scheme and hostname.
Example:
| Redirect /service http://foo2.bar.com/service |
If the client requests |http://myserver/service/foo.txt|, it will be
told to access |http://foo2.bar.com/service/foo.txt| instead.
So in your case you would use something like:
| Redirect /private https://foo2.bar.com/
|
|
|
John