2

In my .htaccess I have the following condition and rule:

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^ https://www.site.com%{REQUEST_URI} [L,R=301]

Which effectively redirects everything to https. But I want to make an exception for files (and subdirectories) in a certain directory. Namely: http://www.site.com/content/

Is this possible? What would that condition look like?

Thanx in advance!

tvgemert
  • 1,436
  • 3
  • 25
  • 50

1 Answers1

2

Place before your condition listed above:

RewriteRule  ^content/  -  [L]
Alvaro Flaño Larrondo
  • 5,516
  • 2
  • 27
  • 46
nwaltham
  • 2,067
  • 1
  • 22
  • 40
  • 2
    Thank you very much, placing it before the last rule resulted in a server error. But inserting it before the condition did the magic! It works! – tvgemert Dec 08 '11 at 15:00