Hi all,
I apologize for the OT, hopefully there is someone on the list that
can give me a little help me with this issue ...
I have a web site with a directory that needs to be accessed only over
HTTPS, HTTP access shouldn't be allowed to that directory for security
reasons.
The rest of the web site needs to be accessed only over HTTP, HTTPS
access shouldn't be allowed to the rest of the web site for
performance reasons.
The document root between the HTTP and HTTPS Apache virtual hosts is shared.
I have the following directive in my Apache HTTP vhost config file to
make sure that if anyone tries to access the secure directory over
HTTP, he is redirected to the HTTPS URL:
RedirectPermanent ^/secureDirectory/
https://www.mywebsite.com/secureDirectory/
This directive works just fine.
Now I need a directive for the Apache HTTPS vhost config file to make
sure that if anyone tries to access the rest of the web site (anything
outside the secure directory) over HTTPS, he is redirected to the HTTP
URL, something like this:
RedirectPermanent !^/secureDirectory/ http://www.mywebsite.com/
Obviously this directive doesn't work, since that's not the right way
to negate a regular expression.
How do I negate it?
Do you have a better solution for this?
Thanks.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229863
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54