I've beat my head on this for 3 days now. I'm missing something, and it's likely really dumb.
First, my situation:
I've got a farm of servers, that people have made bookmarks and links to over the years that used [
....] We recently made a change to make them use https:// and that was all well and good. In fact, I got a lot of help looking through posts here. Grand. Thanks for the help! :) Now, though, I find that we need to make a redirect to a new location for a couple of files, what used to be /authentication.html and /authorization.html to new location/filename.
Being the kind of guy I am, I think it'll be easy to add in a couple of rewriterules to do the trick. Not so much.
Second, my rewrite stuff. There is no other rewrites occuring anywhere on the server:
RewriteEngine On
RewriteRule ^/authentication.html$ /wsso/authn_fail.html [R]
RewriteRule ^/authorization.html$ /wsso/authz_fail.html [R]
RewriteCond %{SERVER_PORT} ^80$ [NC]
RewriteCond %{REQUEST_URI} ^/GroupsUI(/.*)$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/GroupsService(/.*)$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/csm(/.*)$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/server-status(/.*)$ [NC]
RewriteRule .* - [NE,L]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [NE,R=301]
RewriteLog /var/log/httpd/rewrite_log
RewriteLogLevel 3
Third, a description of what happens:
Everything works as expected... For the most part. HTTP-->HTTPS redirects are great, and when a user comes in on
HTTP to /authentication.html, they get redirected to [
[server]...] (granted, via a COUPLE redirects, but I'm not too worried about that at this point). The problem occurs when a person comes in on
HTTPS to [
[server]...] they don't get redirected. Heck, the log doesn't even log it, so I'm thinking that mod_rewrite never SEES IT!
Query:
What have I missed? What am I doing wrong? I'm sure it's something simple... Help?