MythWeb Sub-Pages File not Found

Following a recent update to Apache I found that when I navigated from the MythWeb main page to one of the sub-pages, for example, to the television listings

http://192.168.0.1/mythweb/tv/list

I was seeing an empty page with the simple message:

File not found.

I drew the conclusion that because the main page was functioning the issue was related to the Apache rewrite rules and the handling of the querystring parameters for pages.

Looking the mythtv directory structure these directories and pages are missing implying that it is achieved by query string.

I was using an old configuration with a simple reference within the file:

/etc/apache2/sites-available/000-default.conf.

As a part of my changes I removed the directory reference to mythweb within this file and copied the file /etc/mythtv/mythweb.conf across to the directory/etc/apache2/sites-available.

To enable the use of the mythweb.conf file I issued the command

a2ensite mythweb

This first step didn’t resolve the file not found error.

Looking in the file /etc/apache2/sites-available/mythweb.conf

# If MythWeb is installed outside of the document root (eg. using Alias) then
# you will need to set this directive to the base URL that MythWeb is visible
# from externally.  If you do not, the web server will return 'not found'.
RewriteBase    /mythweb

# Skip out early if we've already been through rewrites,
# or if this is a /css/, /js/ or /cache/ directory request.
RewriteRule    ^(css|data|images|js|themes|skins|README|INSTALL|[a-z_]+\.(php|pl))(/|$)     -     [L]

# Redirect /pl/ requests to the perl cgi handler.
RewriteRule     ^(pl(/.*)?)$            mythweb.pl/$1               [QSA,L]

# Redirect most of the remaining URL requests to the main mythweb script.
# It will then handle any requests given to it.
RewriteRule     ^(.+)$                  mythweb.php/$1              [QSA,L]

# If you're experiencing trouble with the previous two lines in your copy of
# apache, you could instead use something like:
#RewriteRule     ^(pl(/.*)?)$           mythweb.pl?PATH_INFO=/$1    [L,QSA]
#RewriteRule     ^(.+)$                 mythweb.php?PATH_INFO=/$1   [L,QSA]

# Catch anything else that comes through and send it to mythweb.php with no parameters.
RewriteRule     ^(.*)$                  mythweb.php                 [QSA,L]It has the section suggesting that the default rewrite rules may not work under some circumstances.

To correct the issue I commented the two lines.

RewriteRule     ^(pl(/.*)?)$            mythweb.pl/$1               [QSA,L]
RewriteRule     ^(.+)$                  mythweb.php/$1              [QSA,L]

and uncommented the two lines

RewriteRule     ^(pl(/.*)?)$           mythweb.pl?PATH_INFO=/$1    [L,QSA]
RewriteRule     ^(.+)$                 mythweb.php?PATH_INFO=/$1   [L,QSA]

to give:

# If MythWeb is installed outside of the document root (eg. using Alias) then
# you will need to set this directive to the base URL that MythWeb is visible
# from externally.  If you do not, the web server will return 'not found'.
RewriteBase    /mythweb

# Skip out early if we've already been through rewrites,
# or if this is a /css/, /js/ or /cache/ directory request.
RewriteRule    ^(css|data|images|js|themes|skins|README|INSTALL|[a-z_]+\.(php|pl))(/|$)     -     [L]

# Redirect /pl/ requests to the perl cgi handler.
#RewriteRule     ^(pl(/.*)?)$            mythweb.pl/$1               [QSA,L]

# Redirect most of the remaining URL requests to the main mythweb script.
# It will then handle any requests given to it.
#RewriteRule     ^(.+)$                  mythweb.php/$1              [QSA,L]

# If you're experiencing trouble with the previous two lines in your copy of
# apache, you could instead use something like:
RewriteRule     ^(pl(/.*)?)$           mythweb.pl?PATH_INFO=/$1    [L,QSA]
RewriteRule     ^(.+)$                 mythweb.php?PATH_INFO=/$1   [L,QSA]

# Catch anything else that comes through and send it to mythweb.php with no parameters.
RewriteRule     ^(.*)$                  mythweb.php                 [QSA,L]

I saved the above file and restarted Apache using

service apache2 reload

Following the change to the file mythweb.conf and the restart of Apache I was once more able to navigate around the MythWeb sub pages.