Make WordPress Core

Opened 13 years ago

Closed 11 years ago

Last modified 11 years ago

#2142 closed defect (bug) (wontfix)

Class WP and WP_Rewrite should support more than Apache

Reported by: masquerade Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: Administration Keywords: rewrite permalinks lighttpd needs-patch
Focuses: Cc:


Setting a 404-handler has long been the way to get permalinks working where mod_rewrite on apache was not available. For 1.5.2, we had to install a custom patch to wp-blog-header.php to get this working with servers like lighttpd. 2.0 however, breaks this patch, and does not do anything for getting all the permalinks to work. The WP class should support more than just Apache and IIS, and if I can provide any debugging information to help out the process, please let me know.

Change History (12)

#1 @matt
12 years ago

  • Milestone changed from 2.1 to 2.2

#2 @foolswisdom
11 years ago

  • Milestone changed from 2.2 to 2.3

#3 @rob1n
11 years ago

  • Keywords needs-patch added; bg|needs-patch removed

#4 @markjaquith
11 years ago

  • Milestone 2.3 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Hasn't seen any movement in two years.

#5 @darkdragon
11 years ago

I don't really think this ticket should be pushed aside. It seems extremely interesting and support for every Rewrite should be acceptable.

#6 @foolswisdom
11 years ago

darkdragon, it won't get magically worked on by keeping it open. If you are someone else is looking to work on this then please feel free to assign it to yourself.

#7 @darkdragon
11 years ago

Well, I have enough on my plate as it is, but I think the adapter model, might work better. Which is why I said it would be interesting. My curiosity is enough that I might give it a try.

However, I'm not going to open it unless I'm sure. Actually, I think I will. It would be fun, a lot of fun.

#8 @Otto42
11 years ago

The original ticket mentions lighttpd. Does lighttpd have any form of rewrite support? What, specifically, is lighttpd unable to do that breaks compatibility with the WPRewrite class?

#9 @santosj
11 years ago

Its rewrite syntax is different and not compatible with Mod_rewrite.

#10 @JeremyVisser
11 years ago

lighttpd has the full equivalent of RewriteRule support, but absolutely no equivalent to RewriteCond support, so you can't stop it from rewriting URLs that link to real files.

One hack might be to make your WP_HOME directory a sibling of WP_SITEURL, rather than the same directory, or a parent. Another hack people have used is setting /index.php as the 404 handler, which works quite well, provided you're only intending on running one copy of WordPress on your web server. (And you don't care about what your 404s look like.)

#11 @darkdragon
11 years ago

It is however a mute point, one reason the original WordPress Rewrite didn't include Lighttpd is because Lighty doesn't have .htaccess support (unless I'm wrong... and the dozen or so resources I've checked are wrong too). Without .htaccess, the user will have to Manually add the rewrite rules to the Lighttpd .conf file.

Without an automatic mechanism to add rewrite rules to Lighttpd, I would assert that this should remain closed. If a person chooses to use Lighttpd, then they should also choose to manually convert the Mod_Rewrite rules to their .conf file.

#12 @Otto42
11 years ago

For reference, everything I can find on the subject says that the best way is to set the 404 handler to point to WordPress's index.php, which makes sense.

So, the simple way: server.error-handler-404 = "/index.php"

But this is not something WordPress can really do automatically, and as JeremyVisser points out, it has drawbacks (can't run more than one copy of WordPress, real 404's point to WordPress's 404 handler, etc). So I think that this is outside the scope of something WordPress should handle. Use a standard webserver (aka Apache).

Note: See TracTickets for help on using tickets.