[mythtv-users] Absolute links in mythweb

Ben Holt beanjammin at gmail.com
Tue Apr 4 06:52:44 UTC 2006


Hi Chris,

Thanks for the response.

On 03/04/06, Chris Petersen <lists at forevermore.net> wrote:
> > Can someone suggest a relatively simple fix for this?  Any idea what
> > the rational for changing from relative to absolute links was?
>
> Sorry.  In order for the mod_rewrite stuff to work properly, paths need
> to be absolute.  If you're browsing at /mythweb/tv/channel/12345, where
> will the relative link take you?

In my albeit biased version of a perfect world I'd be browsing

http://mywebserver.com/mythtv/mythweb.php?modules=tv&section=channel&chanid=12345
(I think I got your variable names correct, but anyway you get the idea)

then, since you're simply passing variables with your current
"directory structure" a different link might look like
mythweb.php?modules=weather or some such thing.

Aside from creating a fake directory structure is there a purpose to
the use of mod_rewrite that I haven't noticed?  Once upon a time
people did such things because search engines weren't very good at
dealing with variables in the URL and it was thought to improve search
ranking.  I'm not sure why it would be done now except for stylistic
reasons.

> MythWeb will auto-detect the directory level that it's running at and
> build the correct level of absolute path references in order for it to work.
>
> In this case, it sounds more like your setup is misconfigured, since
> mythweb can't tell that your proxy is redirecting from a different level.

I don't understand how PHP running on my mythtv server's apache is
supposed to detect that it is being accessed from a reverse proxy and
auto-detect the URL requested on the proxy.  It can look at it's own
$_SERVER array and figure out where it lives in its own directory
structure relative to DocumentRoot, but that's it.  For all PHP knows
the reverse proxy is just another browser asking for an URL.

I did a little searching through the list archives that suggests I'm
the only one to have mentioned being effected by this change so I
guess I am volunteering myself to look a little further into what will
be involved in going back to a reverse proxy friendly variable passing
scheme.

- Ben


--
A: Because it destroys the flow of conversation.
Q: Why is top posting dumb?


More information about the mythtv-users mailing list