[mythtv-users] MythWeb over HTTPS using mod_rewrite

Ronald Frazier ron at ronfrazier.net
Fri May 25 13:52:41 UTC 2012


On Fri, May 25, 2012 at 9:42 AM, Joe Nyland <joe at joenyland.co.uk> wrote:
> Investigating this issue this afternoon, I've narrowed the issue down
> to my mod_rewrite rule on the Apache reverse proxy server. Here's
> the rule I'm using to make all MythWeb requests get re-written to https://... :
>
> RewriteEngine On
> RewriteCond %{HTTPS} off
> RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
>
> As I say, this works, but just not for the listings page. There
>doesn't appear to be any errors logged in the Apache logs.


This is purely a guess, without having looked into it at all, but
according to the following document:
http://httpd.apache.org/docs/current/mod/mod_rewrite.html

"REQUEST_URI
    The path component of the requested URI, such as "/index.html".
This notably excludes the query string which is available as as its
own variable named QUERY_STRING."

So my guess is that you need to include the query string in your
rewrite rule. So maybe:

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}?%{QUERY_STRING}


Not sure if that's correct, or if it might break anything on a page
that didn't have a query string to begin with (probably not).

-- 
Ron Frazier


More information about the mythtv-users mailing list