2 messages in ru.sysoev.nginxRe: Nginx and Wordpress htaccess url ...
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:Re: Nginx and Wordpress htaccess url conversionActions...
From:Evan Miller (emmi@public.gmane.org)
Date:May 8, 2007 7:34:51 pm
List:ru.sysoev.nginx

Steve <steven.romej@...> writes:

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; #} }

Yikes! Perhaps the error_page directive will come in handy... try:

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

error_page 404 /blog/index.php$request_uri; }

Not 100% sure, but I think that'll work.

Evan

Thank you for your help!