[wp-trac] [WordPress Trac] #57986: `got_url_rewrite` doesn't support Caddy V2

WordPress Trac noreply at wordpress.org
Mon Mar 27 10:27:38 UTC 2023


#57986: `got_url_rewrite` doesn't support Caddy V2
-------------------------+------------------------------
 Reporter:  sadpencil    |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Permalinks   |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by sadpencil):

 Replying to [comment:2 swissspidy]:
 > 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.

 Thanks for the response.

 > How can WordPress detect whether the current web server is a Caddy
 server?

 $_SERVER['SERVER_SOFTWARE'] starts with 'Caddy/v2'

 > 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 `function.php` file. Just wondering if it is better to
 provide a checkbox in permalink page.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57986#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list