httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: [users@httpd] Apache on F11. ANY APPROACH ?excluding images pdfs etc from Https ( ssl ) routing
Date Mon, 02 Nov 2009 09:01:56 GMT
Hi Folks
Thanks a lot
Can someone please point me to some examples of mod_rewrite  where
images, pdf' and other non html files get re-directed to http instead of
I tried this :
 more  /etc/httpd/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{SERVER_PORT} 443
RewriteRule .*.(gif|GIF|jpg|JPG|JPEG|jpeg|png|PNG|PDF|pdf|DOC|doc|txt|TXT)$
http://$1 [PT]

but https : // foobar.jpg is not redirected to http : // foobar.jpg

 more /etc/httpd/conf/httpd.conf | grep -i "root"
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/etc/httpd" will be interpreted by the
# ServerRoot: The top of the directory tree under which the server's
ServerRoot "/etc/httpd"
# httpd as root initially and it will switch.
ServerAdmin root@localhost
# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/var/www/html"
# This should be changed to whatever you set DocumentRoot to.
#   CacheRoot "/var/cache/mod_proxy"
#    DocumentRoot /www/docs/

I know I am missing something here and all you folks  who know mod_rewrite
out there  have really graduated in apache.I created that .htaccess in the
Documentroot and server-root path both

So please tell me what am I missing

2009/11/1 Iñigo Medina García <>

> I would like to JUST limit https usage to the login window html and ALL
>> other images pdf's not secured html
>> ( one that do not need password ) should use HTTP NOT HTTPS
>> What I cannot really find ( and Apache modules make a graduate course , as
>> I am realizing with all the
>> futile digging in ) is HOW do I tell apache that if you find an image file
>> ( .jpeg or .pdf ) if it comes to
>> https convert all that into http .Has that something to do with rewrite or
>> redirect modules .
> Yep. At least that is the way I do it, using rewrite.
> Once you start Apache as a secure server all the content is served through
> secure layer. With rewrite sentences you can override that.
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:> for more info.
> To unsubscribe, e-mail:
>  "   from the digest:
> For additional commands, e-mail:

View raw message