> I have changed the rule to > > RewriteEngine On > RewriteCond %{SERVER_PORT} =80 > RewriteRule ^/teachers/(.*)$ https://%{HTTP_HOST}/$1 [L,R] > > which does not work either. If I change ^/teachers/(.*)$ to ^(.*)$, it > works for every page. But I only wanted it to change when entering the > teachers page. > Clearly, then, I still have the regex wrong. > What is the correct way to achieve the redirection? What if you move /teachers/ into the RewriteCond? Like - RewriteCond %{SERVER_PORT} 80 RewirteCond %{REQUEST_URI} /teachers/ RewriteRule ... --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx