2 messages in ru.sysoev.nginxNginx and Wordpress htaccess url conv...
FromSent OnAttachments
SteveMay 8, 2007 6:18 pm 
Evan MillerMay 8, 2007 7:34 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Nginx and Wordpress htaccess url conversionActions...
From:Steve (stev@public.gmane.org)
Date:May 8, 2007 6:18:07 pm
List:ru.sysoev.nginx

Wordpress ships with a seemingly simple set of htaccess rules to implement its url scheme. I browsed this list and saw some tips for setting up Wordpress MU but I couldn't find a direct translation of the following rewrite rules to the Nginx format.

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /blog/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /blog/index.php [L] </IfModule> # END WordPress

Here's my current mess. I'm trying to run the PHP-based blog off the /blog/ directory. The / directory will contain a Rails app. Not sure if I'm going about that correctly either.

location /blog/ { root html/rankforest.com; index index.php;

#if ( !-e $request_filename ) { # rewrite ^/blog(.*)[^/]$ /blog$1/ break; #}

if ( !-e $request_filename ) { rewrite ^([0-9a-zA-Z]+)?(/wp-.*) $2 break; rewrite ^([0-9a-zA-Z]+)?(/.*\.php)$ $2 last; rewrite ^ /blog/index.php last; }

#if ( !-e $request_filename ) { # rewrite ^/blog/(.*)$ /blog/index.php/$1 break; #} }

Thank you for your help!