-
Notifications
You must be signed in to change notification settings - Fork 12
PATH issue with mod_proxy / mod_rewrite #2
Comments
I've wanted to do this for a while, but the core javascript methods use hard-coded paths. It shouldn't be too much of a problem, but I just haven't taken the time to look at it. |
"core" as in stuff you wrote or JQuery? I took a poke at it last night and it did look like a path change would be required in almost every file. |
Stuff I wrote. I didn't worry too much about hard-coding everything when I wrote it because it started out being for personal-use only and I was happy to have a standalone server. I still want to do it, but figuring out a good way to rewrite all of the paths in js/theory.js will be a challenge. |
is this still something you're interested in? between work, college and college application season, I've kinda stopped coding anything :/ |
I finally got off my ass and worked on this. I'll send a pull request. it touches a ton of lines, but they're all pretty trivial, mostly turning "/" into "./" and the occasional "../" it's been tested by using both the proxy and non-proxy interfaces at the same time and looking for 404/500 errors with Firebug. as far as I can tell, it "works", minus a few places in jquery-ui. currently, the URL prefix is hardcoded into the dev and server INIs. I'm not sure how to change that if it's required. next project is to create a skeleton for running the server through mod_wsgi. edit: hit the wrong button, but it can probably be closed. |
see ralfonso#2 at https://github.com/ralfonso/theory/issues Signed-off-by: Jan Losinski <[email protected]>
so as written, theory assumes that it will always operate as its own port with its own root (/). however, if you try and include it as part of another hierarchy, you get PATH-related breakage. for example, I run theory on an internal server and want to access it from an external web server using apache2's mod_rewrite like so:
RewriteRule ^/mpd/(.*) http://192.168.10.1:9099/$1 [P]
now when theory renders, it looks for /js, which may not actually exist. I think this can mostly be fixed by removing the preceding slash from all the paths, replacing it with ./ or defining an internal PATH variable so we can define the root at will. I'd be happy to knock out a patch for you. do you a have a preference on how to do this? or do you even want this? I can just fork and maintain a separate patch for my bizarre edge-case setup :D
The text was updated successfully, but these errors were encountered: