Opened 23 months ago
Closed 12 months ago
#57986 closed enhancement (duplicate)
`got_url_rewrite` doesn't support Caddy V2
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Permalinks | Keywords: | |
Focuses: | Cc: |
Description
In Caddy V2, redirect about index.php file is automatically configured by default. However, wordpress does not detect Caddy in function got_url_rewrite
so the permalink always has an 'index.php' in the middle.
See also: https://caddy.community/t/wordpress-pretty-permalinks-in-caddy-v2/18980/8
Change History (5)
#2
follow-up:
↓ 3
@
23 months ago
- Version trunk deleted
Hi there and welcome to WordPress Trac!
How can WordPress detect whether the current web server is a Caddy server? Are there any functions it could check?
Moreover, it could be better to provide a checkbox, allowing users to tell WordPress that it can assume redirects are applied without actually checking for it
The got_url_rewrite
filter is useful for this.
#3
in reply to:
↑ 2
@
23 months ago
Replying to swissspidy:
Thanks for the response.
How can WordPress detect whether the current web server is a Caddy server?
$_SERVER['SERVER_SOFTWARE']
This string starts with 'Caddy/v2', e.g., 'Caddy/v2.6.4'
The
got_url_rewrite
filter is useful for this.
I know I can write a custom filter to override got_url_rewrite
in my child theme's functions.php
file. Just wondering if it is better to provide a checkbox in permalink page.
#4
@
12 months ago
Hi, is there anything I (as a nobody :) ) can do to see Caddy support going forward? I noticed that there was already a request with a patch available a few years ago, but it just got forgotten.
Request: https://core.trac.wordpress.org/ticket/41877
Patch: https://core.trac.wordpress.org/attachment/ticket/41877/41877.patch
Moreover, it could be better to provide a checkbox, allowing users to tell WordPress that it can assume redirects are applied without actually checking for it