1

Topic: Server configuration

Hi all,

Im building a site where i want everything except the index controller to be behind https but have no idea how to go about it in my htaccess or virtualhost configuration.

At the moment i just have everything requiring to use SSL with my port 80 virtual host redirecting everything to port 443

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [R,L]

and my 443 virtual host requring SSL

SSLEngine on
SSLCertificateFile /path/to/apache.crt
SSLCertificateKeyFile /path/to/apache.key

they both have the same base directory config

<Directory "/path/to/website/public">
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
</Directory>

and the site itself has a bog standard .htaccess file

RewriteEngine on
RewriteRule !(.html|.htm|.xml|.js|.ico|.gif|.jpg|.png|.css|.pdf|.ini)$ index.php

yet i have no idea how id go about adjusting the setup to allow for www.mysite.com/index/{indexActions} to be allowed through http only and everywhere else to be available through https only, the reason being that ive set up a Certificate authority and only want certain people to whom ive distributed a certificate to have access to 'everywhere else'

i hope you guys can help out, if you need more detail let me know!

Thanks in advance big_smile