Skip to content

docs: clarify htaccess.RewriteBase is a backend path, not public URL#14938

Merged
skjnldsv merged 1 commit into
masterfrom
fix/htaccess-rewritebase-reverse-proxy
May 20, 2026
Merged

docs: clarify htaccess.RewriteBase is a backend path, not public URL#14938
skjnldsv merged 1 commit into
masterfrom
fix/htaccess-rewritebase-reverse-proxy

Conversation

@skjnldsv
Copy link
Copy Markdown
Member

@skjnldsv skjnldsv commented May 20, 2026

☑️ Resolves

What changed and why

The previous description of htaccess.RewriteBase implied the value should
mirror the public URL (e.g. /nextcloud for https://domain.com/nextcloud/).
This is wrong in reverse-proxy setups where the proxy strips the URL prefix
before forwarding to the backend server. A user with domain.com/nextcloud/
forwarded to localhost:8080/ (Nextcloud at DocumentRoot) must set the value
to /, not /nextcloud — using /nextcloud causes infinite redirects.

The fix:

  • Explicitly states the value is the path relative to Apache's DocumentRoot
    on the backend, not the public URL prefix
  • Adds a .. note:: in the Pretty URLs section of source_installation.rst
    with the same clarification

cc @hwalinga

🖼️ Screenshots

No visual/layout changes — text-only.

✅ Checklist

  • I have built the documentation locally and reviewed the output
  • Screenshots are included for visual changes (N/A — text only)
  • I have not moved or renamed pages (or added a redirect if I did)
  • I have run codespell or similar and addressed any spelling issues

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

📖 Documentation Preview

🔍 Open preview →

📄 1 changed documentation page

Last updated: Wed, 20 May 2026 05:49:54 GMT

The previous description implied the value should mirror the public URL,
causing users behind a reverse proxy to misconfigure the setting and hit
infinite redirect loops. The value is an Apache RewriteBase directive
and must reflect where Nextcloud is served on the backend (relative to
DocumentRoot), not the public-facing URL prefix.

Split into "Direct setup" and "Reverse proxy" sections with a concrete
example of each, and added a matching note in the Pretty URLs section of
the source installation guide.

Fixes #13428

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv skjnldsv force-pushed the fix/htaccess-rewritebase-reverse-proxy branch from 7efe6df to 486ce78 Compare May 20, 2026 05:44
@skjnldsv skjnldsv merged commit 83bf3a0 into master May 20, 2026
25 checks passed
@skjnldsv skjnldsv deleted the fix/htaccess-rewritebase-reverse-proxy branch May 20, 2026 06:38
@skjnldsv
Copy link
Copy Markdown
Member Author

/backport to stable34

@skjnldsv
Copy link
Copy Markdown
Member Author

/backport to stable33

@skjnldsv
Copy link
Copy Markdown
Member Author

/backport to stable32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarification for htaccess.RewriteBase: For folders or urls?

2 participants