Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#41166 assigned enhancement

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

Reported by: johnbillion Owned by: lipathor
Milestone: Future Release Priority: normal
Severity: normal Version: 3.0
Component: Networks and Sites Keywords: good-first-bug has-patch
Focuses: administration, multisite Cc:


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 (2)

41166.diff (902 bytes) - added by lipathor 3 years ago.
Alternative text for NGINX powered sites
41166v2.diff (1.3 KB) - added by lipathor 3 years ago.
Second version

Download all attachments as: .zip

Change History (7)

3 years ago

Alternative text for NGINX powered sites

#1 @lipathor
3 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
3 years ago

  • Keywords has-patch added; needs-patch removed

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

3 years ago

#4 @flixos90
3 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
3 years ago

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

3 years ago

Second version

Note: See TracTickets for help on using tickets.