Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#41166 closed enhancement (fixed)

.htaccess config should not be shown on network setup screen when Nginx is in use

Reported by: johnbillion's profile johnbillion Owned by: lipathor's profile lipathor
Milestone: 5.5 Priority: normal
Severity: normal Version: 3.0
Component: Networks and Sites Keywords: good-first-bug has-patch needs-refresh
Focuses: administration, multisite Cc:

Description

When Nginx is in use, the .htaccess configuration shouldn't be shown after multisite installation on the Tools -> Network Setup screen.

It should probably be replaced with a link to the Nginx page on the Codex. Same behaviour as the Settings -> Permalinks screen for Nginx.

Attachments (4)

41166.diff (902 bytes) - added by lipathor 7 years ago.
Alternative text for NGINX powered sites
41166v2.diff (1.3 KB) - added by lipathor 7 years ago.
Second version
41166v3.diff (1.4 KB) - added by lipathor 5 years ago.
Refreshed patch
41166.3.diff (1.4 KB) - added by audrasjb 5 years ago.
Patch refresh for coding standards and better i18n.

Download all attachments as: .zip

Change History (15)

@lipathor
7 years ago

Alternative text for NGINX powered sites

#1 @lipathor
7 years ago

Sometimes it's not possible to determine webserver that run our site (depend on configuration). But when $_SERVER["SERVER_SOFTWARE"] is provided, setup prints text with link to Codex.

#2 @lipathor
7 years ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in Slack in #core-multisite by greatislander. View the logs.


7 years ago

#4 @flixos90
7 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Owner set to lipathor
  • Status changed from new to assigned

Thanks for the patch @lipathor! There are only a few suggestions I'd like to make:

  • I agree that a link makes more sense than inserting an nginx config file there, since that is much bigger and more complicated than the .htaccess snippet. I think it would be a neat improvement though if we could point the link to the relevant section on the Codex page automatically:
    • If a subdirectory setup is being created, append #WordPress_Multisite_Subdirectory_rules
    • If a subdomain setup is being created, append anchor #WordPress_Multisite_subdomains_rules
  • The check for whether the current setup is using nginx, can be simplified by using the $is_nginx global that WordPress sets up.
  • The location of the comment // end iis7_supports_permalinks(). construct an htaccess file instead: needs to be adjusted since it doesn't make sense where it's currently at.

I'm assigning this to you to mark this ticket as claimed. :)

#5 @lipathor
7 years ago

Hi again, i'm proudly providing new patch, including your suggestions @flixos90 :)

@lipathor
7 years ago

Second version

This ticket was mentioned in Slack in #core by sergey. View the logs.


5 years ago

#7 @SergeyBiryukov
5 years ago

  • Milestone changed from Future Release to 5.5

#8 @SergeyBiryukov
5 years ago

  • Keywords needs-refresh added

The patch could use a refresh for linking to HelpHub instead of Codex: https://wordpress.org/support/article/nginx/

Last edited 5 years ago by SergeyBiryukov (previous) (diff)

@lipathor
5 years ago

Refreshed patch

#9 @lipathor
5 years ago

@SergeyBiryukov i pushed refreshed patch

@audrasjb
5 years ago

Patch refresh for coding standards and better i18n.

#10 @SergeyBiryukov
5 years ago

Thanks for the updated patch! Just noting the URL should be translatable and the link anchors won't be the same for translated content. Let's keep it simple and link to https://wordpress.org/support/article/nginx/, without the anchors.

#11 @SergeyBiryukov
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 47632:

Networks and Sites: Link to Nginx documentation on Network Setup screen when Nginx is in use.

Props lipathor, audrasjb, johnbillion, flixos90.
Fixes #41166.

Note: See TracTickets for help on using tickets.