Description

Hi,

today I've been testing new version of WP and noticed that old permalinks (rewrite rules(​http://codex.wordpress.org/Installing_WPMU) for other servers than Apache ), stopped working and that Wordpress assumes it's only run on Apache.

After investigating I figured out, that for time being the best way is to define constant in config.php which overrides the detection, and assumes that you taken care of URL rewriting by yourself.

Change History (7)

I'm generally in favor of filters over constants except for server-related config such as this. But, there is a filter there already. I'm not sure I see the infinite loop issue. What's to prevent you from doing:

I have never experienced any problems with this, and have been running my site on nginx for over 2 years. I have tested using the rewrite that you listed, I have tried removing the checks if the $request_filename exists, and no matter what I haven't been able to duplicate.

I have used both:

if (!-e $request_filename) {
rewrite . /index.php last;
}

and

if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$1 last;
}

I have since added the very filter that nacin mentioned so that it does not include the index.php.

In addition we try to use filters for things such as this. I am -1 for a constant.

I am also -1 for rewriting the detection functions. The detection function works the way that it does so that it can without a doubt determine that rewriting is enabled. nginx and lighttpd as well as many others can be compiled without rewrite functionality. In addition rewrites for such servers also requires modification to the server config, and you cannot assume that a user will have access to it.

If you want to give a user the option to choose whether he/she is using custom rewrite rules, I feel that is plugin territory. In general if you think we should add another option to the admin, the rule of thumb is generally that it shouldn't go into core but be implemented as a plugin.