Help requested with rewrites

Jim Ohlstein jim.ohlstein at gmail.com
Tue Oct 14 09:28:42 MSD 2008


Hello,

This is probably very simple but I can't seem to figure it out.

A site that I'm trying to migrate has the following rewrites in an .htaccess
file:


RewriteRule ^(.*)/(.*)/$ index.php?k=$1&v=$2 [nc]

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [S=44]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [S=44]

RewriteRule ^(.*)/$ index.php?k=$1 [nc]



I have tried multiple variations of


location / {

error_page 404 = //index.php;

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

}

No luck. Any help would be appreciated.

Jim






More information about the nginx mailing list