> Francisco Javier Mart�nez Mart�nez wrote:
> 
> Hello.
> Anyone knows how to secure only a few directories and left the rest of the
> web unsecure = only accesible with http:// nor with https://.
> That is due to we are using relatives direcctions in our pages (not the whole
> URL path), and the problem is that if you are in a http page and navigate to
> a https page, everything is ok, but if you from this https page goes to a
> http clicking over a link, as this link is relative, you still are in https
> navigation mode, this forces to write the pages with the whole URL path, and
> there is a lot.

You can either use the simple Redirect command in the two virtual hosts (http
and https) or you can get fancy and use the Rewrite engine.

For example, if you have directories that are secured, you redirect from the
http virtual host to the https virtual host, and vice versa, in the https
virtual host, you redirect the patterns that match the non secured directories
to the http virtual host:

<VirtualHost ip:80>
...
Redirect /securedirectory https://yoursite/securedirectory
...
</VirtualHost>

<VirtualHost ip:443>
...
Redirect /unsecuredirectory http://yoursite/unsecuredirectory
...
</VirtualHost>

This is the idea, but you will need to work on the patterns a little more to
make it efficient...
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to