[#643] url_prefix configuration parameter not really efficient

Description

Summary:

Detailed description

I try to do operate fusionforge into a context like this :http://www.toto.com/forge/

  1. To do this, i use the the configuration parameter "url_prefix", but when i set this, some css and images don't load.

To correct this, i commited in branch52 ba59a00e5c00ba3fd4bdd67bf48a7ea68958ab13 Franck fixed my commit with this : dc543105eb5d997c3c56f499fff3611f6ab2b447 1254786f5341f3bfdfbcfd56a9042ea4c49b9fdd 63482cd970e1aec34b669c9b4e8b05008a60bb2a and other commits were be done.

These commits were merged into Branch53 and master too.

  1. But, we have problems with forms.

With this configuration, i now see that many forms are broken because they used : <form action="<?php echo getStringFromServer('PHP_SELF'); ?>"

Maybe we can replace all by using utilmakeurl() function ? Or maybe it's only an apache configuration problem. If i put Alias /forge /usr/share/gforge/www in vhost-main.inc, forms run fine.

For forms using directly this : <form action="/developer/rate.php" method="post">, only one solution, patch the code.

  1. I see another probleme in file common/include/pre.php, if forcelogin == yes, we have this test : if (getStringFromServer('REQUESTURI')!='/' && $explpathinfo[1]!='account' && $explpathinfo[1]!='export' && $explpathinfo[1]!='plugins') exitnotloggedin(); This line cause a redirect loop, because, is not / or /account, but /forge or /forge/account.

  2. Another problem, in all post-login.php, we have code to set $returnto. I think this code is broken if you have an urlprefix.

how way to correct that ?

Maybe we must think about all available configurations before make changes.

General Information
Submitted by:
Julien HEYMAN
Date Submitted: 2014-03-12 17:30
Last Modified by: Nobody
Last Modified: 2017-11-02 20:00
Date Closed: 2016-09-18 16:27
Permalink: https://fusionforge.org/tracker/a_follow.php/643
Actions
Monitor
Votes: 0/1 (0%)
Internal Fields
Data Type: Bugs
Assigned to: Franck Villaume (nerville)
State: Closed
Priority: 3
Extra Fields
Resolution:
Fixed
Severity:
normal
Target Release:
6.1
Found in Version:
5.2.3
Follow-up tabs
Message  ↓
Date: 2016-09-18 16:27
Sender: Franck Villaume

fixed in master To be part of the 6.1 release. Be sure to adapt your code in your plugins. REQUESTURI & PHPSELF are patched to support urlprefix. Advice: use openForm or utilmake_link to generate correct code.

Date: 2014-03-26 10:40
Sender: Julien HEYMAN

Ok, on the frontend, i have : ProxyPass /forge https://forge.toto.fr/forge ProxyPassReverse /forge https://forge.toto.fr/forge

You can find apache backend configuration in attachment.

Date: 2014-03-26 08:49
Sender: Franck Villaume

Julian,

could you provide the httpd configuration you use ?

Date: 2014-03-13 13:51
Sender: Franck Villaume

all tags <a> must be replaced by the function utilmakelink all actions must use utilmakeuri

Both functions handle correctly url_prefix.

Date: 2014-03-13 10:23
Sender: Julien HEYMAN

And , some links are hard coded : www/project/admin/tools.php : if($group->usesForum()) { ?> <p><a href="/forum/admin/?groupid=<?php echo $group->getID(); ?>"><?php echo _('Forums Admin') ?></a></p> <?php } if($group->usesTracker()) { ?> <p><a href="/tracker/admin/?groupid=<?php echo $group->getID(); ?>"><?php echo ('Trackers Admin') ?></a></p> <?php } if($group->usesMail()) { ?> <p><a href="/mail/admin/?groupid=<?php echo $group->getID(); ?>"><?php echo ('Mailing Lists Admin') ?></a></p> <?php } if($group->usesPM()) { ?> <p><a href="/pm/admin/?groupid=<?php echo $group->getID(); ?>"><?php echo ('Tasks Admin') ?></a></p> <?php } if($group->usesDocman()) { ?> <p><a href="/docman/?groupid=<?php echo $group->getID(); ?>&amp;view=admin"><?php echo ('Documents Admin') ?></a></p> <?php } if($group->usesSurvey()) { ?> <p><a href="/survey/admin/?groupid=<?php echo $group->getID(); ?>"><?php echo ('Survey Admin') ?></a></p> <?php } if($group->usesNews()) { ?> <p><a href="/news/admin/?groupid=<?php echo $group->getID(); ?>"><?php echo ('News Admin') ?></a></p> <?php } if($group->usesSCM()) { ?> <p><a href="/scm/admin/?groupid=<?php echo $group->getID(); ?>"><?php echo ('Source Code Admin') ?></a></p> <?php } if($group->usesFRS()) { ?> <p><a href="/frs/admin/?groupid=<?php echo $group->getID(); ?>"><?php echo _('File Release System Admin') ?></a></p> <?php }

Attachments:
Size Name Date By Download
4 KiBhttpd_backend.tar.gz2014-03-26 10:41
Julien HEYMAN
httpd_backend.tar.gz

No related commits.

Field Old Value Date By
status_idOpen2016-09-18 16:27
Franck Villaume
close_dateNone2016-09-18 16:27
Franck Villaume
assigned_tonone2016-09-18 16:27
Franck Villaume
ResolutionAccepted As Bug2016-09-18 16:27
Franck Villaume
Target ReleaseNone2016-08-27 13:05
Franck Villaume
SeverityNone2016-08-27 13:05
Franck Villaume
ResolutionNone2016-08-27 13:05
Franck Villaume
File Added403: httpd_backend.tar.gz2014-03-26 10:41
Julien HEYMAN

No relations found.