[wp-trac] [WordPress Trac] #25098: Support URL rewrites on Nginx

WordPress Trac noreply at wordpress.org
Wed Aug 21 00:58:02 UTC 2013


#25098: Support URL rewrites on Nginx
---------------------------+------------------
 Reporter:  johnbillion    |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  3.7
Component:  Rewrite Rules  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |
---------------------------+------------------

Comment (by c3mdigital):

 Replying to [comment:4 dd32]:
 > The one thing that this patch is lacking, is the fact that by default
 nginx isn't configured for url rewriting, but we do configure Apache/IIS
 as best we can for rewrites.
 >
 > I wish we could detect this via a local HTTP callback + transient cache
 or something..

 The HttpRewriteModule is one of the standard
 [http://wiki.nginx.org/Modules modules] and the only way for it not to be
 installed is if Nginx is compiled with the --without-http_rewrite_module
 flag.  That still doesn't mean that the user has rewrite rules properly
 configured.

 One thing we could do is write the configuration in the root web directory
 and update the codex examples to include this file in their server
 configurations.  This is how W3 Total Cache writes to the nginx config.

 One option would be if Nginx is detected create a test rewrite rule then
 send a HTTP request to see the response code.  If we get back a 404 then
 got_rewrite returns false.

 The other problem with writing to the config is the server has to be
 restarted for the changes to take.  Kind of interesting how Drupal does
 it,
 http://drupalcontrib.org/api/drupal/contributions!provision!http!Provision!Service!http!nginx.php/6

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25098#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list