---
title: "Deprecation: #65938 - Discourage usage of \"$TSFE->anchorPrefix\""
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:deprecation-65938"
source: "Changelog/7.2/Deprecation-65938-TSFEAnchorPrefix.rst"
typo3-version: "7.2"
typo3-major: 7
type: "deprecation"
issue: 65938
forge: "https://forge.typo3.org/issues/65938"
tags: ["TypoScript", "Frontend"]
rendered: "2026-09-20T05:05:02+00:00"
---

# Deprecation: #65938 - Discourage usage of "$TSFE->anchorPrefix" {#deprecation-65938}

See [forge#65938](https://forge.typo3.org/issues/65938)

## Description {#description}

The property "anchorPrefix" within TypoScriptFrontendController is set to the relative path from the public site
root when `config.baseURL` is set, and can be used to prefix local anchors with that prefix. The option has been
marked as deprecated in favor of using `config.absRefPrefix` when this functionality is needed.

## Affected installations {#affected-installations}

All installations or extensions relying on the TypoScriptFrontendController property "anchorPrefix" running
with the TypoScript option `config.baseURL` enabled.

## Migration {#migration}

Use the PHP code below directly to fetch the information when needing baseURL and the anchorPrefix option.

```php
GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'), strlen(GeneralUtility::getIndpEnv('TYPO3_SITE_URL'))
```

Alternatively, use `config.absRefPrefix` to achieve the same result.
