⧼vector-jumptocontent⧽

20 baseurls.pl: Difference between revisions

From EPrints Documentation
No edit summary
No edit summary
Line 1: Line 1:
{{dirs}}
{{cfgd}}
You should probably never edit this file unless you really really know what your doing.
You should probably never edit this file unless you really really know what your doing.



Revision as of 10:02, 27 July 2010


Back to cfg.d

You should probably never edit this file unless you really really know what your doing.

Example

{
        my $uri = URI->new( "http://" );
        if( EPrints::Utils::is_set( $c->{host} ) )
        {
                $uri->scheme( "http" );
                $uri->host( $c->{host} );
                $uri->port( $c->{port} );
                $uri = $uri->canonical;
                $uri->path( $c->{http_root} );
        }
        else
        {
                $uri->scheme( "https" );
                $uri->host( $c->{securehost} );
                $uri->port( $c->{secureport} );
                $uri = $uri->canonical;
                $uri->path( $c->{https_root} );
        }

# EPrints base URL without trailing slash
        $c->{base_url} = "$uri";
# CGI base URL without trailing slash
        $c->{perl_url} = "$uri/cgi";
}