This version of URL is a non-proxied method for accessing a remote web server based on EZproxy retrieving some information from the remote web server and passing it unedited to the remote browser or else redirecting a user to a URL that is hidden from unauthorized users. This method can be used to create public URLs that hide URLs that contain usernames and passwords.
In this form of URL, the URL used to reference this database stanza is formed by adding /login/label after the main URL for the EZproxy server, such as http://ezproxy.yourlib.org/ login/label.
If a user accesses a /login/label URL from an IP address that requires user authentication (as opposed to an ExcludeIP address), and the user has not authenticated to EZproxy already, then the user will be challenged to authenticate before being allowed to proceed.
When an authenticated user or a user accessing from an ExcludeIP address accesses a /login/label URL, EZproxy will provide access as follows:
URL can be used only once per database stanza and interacts with database stanzas, groups, interface directives and IP ranges. The scope of URL is the current database stanza. It is a position-dependent config.txt directive.
Qualifier | Description |
---|---|
label | Label to use when building EZproxy URLs that refer to this database stanza. |
url | URL to retrieve or to which to redirect users. |
Option | Description |
---|---|
-Refresh | Specify that authorized users should be sent to the remote URL using a browser refresh. This option is preferred when the remote server should see the referring URL as the EZproxy server. |
-Redirect | Specify that authorized users should be sent to the remote URL using a HTTP redirect. This option is faster, but the destination web server may not see the referring URL as the EZproxy server. |
-Append | Specify that any text that appears after label and a slash should be appended on to url. |
-Encoded | Must be with -Append and specifies that the text is being appended should be encoded as URL safe first. |
URL [-Refresh] [-Redirect] [-Append] [-Encoded] label url
Scenario: In this example, users can access a resource using an EZproxy login URL like:
https://ezproxy.yourlib.org/login/somedb
and be redirected to:
https://www.somedb.com/login.asp?inst=secret
To achieve this, the following configuration should be used in EZproxy:
Title Some Database
URL -Redirect somedb https://www.somedb.com/login.asp?inst=secret
This configuration tells EZproxy to redirect users rather than retrieve and display the content. The label somedb
is used in the EZproxy login URL, which means that when a user visits https://ezproxy.yourlib.org/login/somedb
, they will be automatically redirected to https://www.somedb.com/login.asp?inst=secret
. Using -Redirect
ensures that the user's browser is sent directly to the destination URL.
Scenario: In this example, users can visit a URL like:
https://ezproxy.yourlib.org/login/otherdb/history
and be redirected to:
https://www.otherdb.com/search?q=history
where history is dynamically appended as a query parameter.
To enable this behavior, the following configuration should be used:
Title Other Database
URL -Redirect -Append -Encoded otherdb
https://www.otherdb.com/search?q=
This configuration instructs EZproxy to redirect users while also allowing additional text to be appended to the base URL. The -Append option ensures that any text appearing after /login/otherdb/ in the EZproxy URL is added to the end of https://www.otherdb.com/search?q=
. The -Encoded
option ensures that any special characters in the appended text are properly URL-encoded to prevent issues with special symbols or spaces.
For example, when a user visits https://ezproxy.yourlib.org/login/otherdb/history
, EZproxy appends history to the base URL and redirects the user to https://www.otherdb.com/search?q=history
. This setup allows for dynamic query-based redirections.
In some cases, the values that need to be appended to a URL may contain special characters such as spaces, ampersands (&
), or other symbols that require encoding to be correctly interpreted by the destination website.
For instance, suppose you want users to be able to visit:
https://ezproxy.yourlib.org/login/articles/advanced search
and have EZproxy redirect them to:
https://www.articlesearch.com/query?search=advanced%20search
where the space in "advanced search" is properly encoded as %20. To enable this behavior, the following configuration should be used:
Title Article Search
URL -Redirect -Append -Encoded articles https://www.articlesearch.com/query?search=
This configuration allows users to access https://ezproxy.yourlib.org/login/articles/advanced search
, where advanced search is appended to https://www.articlesearch.com/query?search=
. Since -Encoded
is specified, EZproxy will automatically convert special characters (such as spaces) into their URL-safe equivalents before appending them to the final URL.
For example, if a user enters https://ezproxy.yourlib.org/login/articles/science & technology
, EZproxy will encode the space ( ) as %20 and the ampersand (&) as %26, resulting in the following redirection:
https://www.articlesearch.com/query?search=science%20%26%20technology
Without the -Encoded
option, special characters might break the URL or be misinterpreted by the destination site. This example highlights how -Encoded
ensures compatibility when passing dynamic query parameters that contain spaces, ampersands, or other special characters. If you don't use the -Encoded
, then EZproxy will not encode special characters. If a user tries to search for science & technology, EZproxy will append it without encoding, leading to:
https://www.articlesearch.com/query?search=science & technology
which will not work correctly because some browsers may misinterpret the space as an invalid URL. Additionally, the ampersand may be interpreted incorrectly as separating URL parameters.