View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0011172 | mantisbt | other | public | 2009-11-14 03:27 | 2009-11-15 11:50 |
| Reporter | btrotter | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 1.2.0rc2 | ||||
| Summary | 0011172: Virtual DocRoot's muck up the works | ||||
| Description | I'm a totally new mantis user trying to run it on a Godaddy hosted domain in a virtual doc root. Mantis keeps trying to tack on the virtual doc root relative path on to every page thanks to the html_meta_redirect and config_get( 'path' ). I managed to fight my way to the preferences page and set the path, and that helps about 50% of the links, but at least within management, many still redirect to the wrong place. I haven't had much chance to try anything else yet. I've been at this for less than 30 minutes. In any case, I know Virtual DocRoots aren't the world's most common thing, but this is a bit of a showstopper if you're on a host that uses them unless I'm missing some easy way to fix the redirects. | ||||
| Steps To Reproduce | Install on host with virtual doc root Mantis keeps shoving /sites/mantis on the URL when it shouldn't, despite setting path = string = "/tracker/" in the preferences, meaning every click to a new page one has to edit the URL in the header. | ||||
| Tags | No tags attached. | ||||
| Attached Files | mantis_docroot.patch (533 bytes)
*** config_defaults_inc.php Tue Oct 6 14:18:41 2009
--- config_defaults_inc.php.new Sun Nov 15 09:46:10 2009
***************
*** 112,117 ****
--- 112,121 ----
$t_host = 'www.example.com';
}
+ if ( isset( $_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] ) && isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
+ $_SERVER['DOCUMENT_ROOT'] = $_SERVER['SUBDOMAIN_DOCUMENT_ROOT'];
+ }
+
// Get server root to compare with path to this file
if( !isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
if( isset( $_SERVER['SCRIPT_FILENAME'] ) ) {
| ||||
|
i made a mistake in the submission because I changed my mind about my example partway. I meant to say mantis keeps tacking on /sites/test instead of /sites/mantis. |
|
|
proposed patch attached. there's probably a better way to handle it, but given the way that section is written, this was the quickfix. EDIT: P.S. patch working in production for me. |
|