Hi,

 

Currently hosting an OTRS behind a proxy. We have a ProxyPass directive on the proxy which forwards requests to http://otrs-server-ip/otrs/

 

But, this creates an problem when it comes to forms in OTRS, since form action url will be  /otrs/__scriptname__. But, I want it to be __scriptname__.

This URL is generated in Layout.pm like this:

$Self->{CGIHandle}   = $ENV{SCRIPT_NAME} || 'No-$ENV{"SCRIPT_NAME"}';

 

What I did to solve this problem, is removing /otrs/ in beginning of every string. So after the above line, I’ve added this:

$Self->{CGIHandle}   =~ s/^\/otrs\///;

 

On my system the $Env variable $0 returns the full path, so I cannot use that, and adding modules to extract the scriptname would complicate things.

 

Is there a smarter way?

 

Best regards,

 

Tore