Simplify how fullBase is calculated.

Using FULL_BASE_URL fixes URL generation when URL rewriting is
disabled.

Fixes #3777