Any tricks for http->https and vise versa?

Cheetoz

[H]ard|Gawd
Joined
Mar 3, 2003
Messages
1,972
I have
Code:
        RewriteEngine on
        Options +FollowSymLinks
        Order allow,deny
        Allow from all
        RewriteCond %{SERVER_PORT} !^443$
        RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
under my main directory /var/www. The problem is when streaming media, im using kplaylist, it needs to use http to stream not https.

If I set my music folder to redirect to port 80, the request would just get directed back to 443

Is there a way to set all redirects to port 443 except the /music folder? (and not via putting the RewriteEngine for every folder instead)

I tried making a new virtual host on port 81, and then on the ssl config I put
Code:
<Directory /var/www/music>
        RewriteEngine on
        Options +FollowSymLinks
        Order allow,deny
        Allow from all
        RewriteCond %{SERVER_PORT} !^81$
        RewriteRule ^.*$ http://%{SERVER_NAME}%{REQUEST_URI} [L,R]
</Directory>
but I get "Firefox has detected that the server is redirecting the request for this address in a way that will never complete."

any ideas?

thanks.

(fixed; needed to add the new Listen port to /etc/apache2/ports.conf ; and for redirect RewriteRule ^.*$ http://%{SERVER_NAME}:port [L,R]
 
What alot of people do is have the pages that need ssl on a subdomain and have the rest at the domain level.
 
Back
Top