Apache Server configuration support - a combination of SSL and rewriting rules

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > July 2006 > a combination of SSL and rewriting rules





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author a combination of SSL and rewriting rules
dat

2006-07-21, 7:36 am

Hi,
I am setting up a server with apache 2.0.46 (redhat) to work with a cms
(typo3). I have to use ssl connection for the backend. I have moved the
backend part of the cms to the httpsdocs (https) directory and I use this
..htaccess file on httpdocs (http) to redirect to ssl connection

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^typo3[/]$ https://%{HTTP_HOST}%{REQUEST_URI}[R=permanent]
RewriteRule ^typo3/(.*)\.php(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}
[R=permanent]

all work fine, but now I noticed that for every image,css,js on the page
the client makes a new GET to the https server. This is very slow and I
would like to use https only for php pages and for images use normal http.
Is it possible? I tried with this .htaccess on httpsdocs

RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule ^(.*)\.gif$ http://%{HTTP_HOST}%{REQUEST_URI} [R=permanent]

but doesn't work.
Any idea or link that can help?
Thanks
dat

P.S: sorry for my bad english
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com