redirect help please... this one's driving me mad!

Steve Holdoway steve at greengecko.co.nz
Fri Mar 21 22:37:38 UTC 2014


Sadly not one mention of the correct way to handle %1 and $1 in either
of these pages.

Anyone?? 

Cheers,

steve

On Thu, 2014-03-20 at 22:14 -0700, Payam Chychi wrote:
> Hi Steve,
> 
> that's a lot of apache nonsense ;) that you shouldn't need
> 
> check out:
> http://nginx.org/en/docs/http/converting_rewrite_rules.html
> 
> another useful link with great commenting:
> https://blog.engineyard.com/2011/useful-rewrites-for-nginx/
> 
> -Payam
> 
> On 2014-03-20, 9:44 PM, Steve Holdoway wrote:
> > I'm tryiing to migrate a site that uses codeigniter behind modx to draw
> > pages, and this is the block that breaks the site when I remove it
> > from .htaccess...
> >
> >          RewriteRule ^$ home [L]
> >          RewriteCond %{HTTP_HOST} ^(?:www\.)?([^\.]*)\..*$ [NC]
> >          RewriteCond %{REQUEST_URI} !^/?$
> >          RewriteCond %{REQUEST_FILENAME} !-f
> >          RewriteCond %{REQUEST_FILENAME} !-d
> >          RewriteRule (.*) index.php?q=/_%1/pages/$1 [L,QSA]
> >
> >
> > Does anyone have an idea on how to rewrite that? From debugging code
> > added to the site, it seems to go through index.php 3 times for each
> > page draw!
> >
> > Any suggestions gratefully received - I can't get my head around the
> > params from the condition and those from the rule and how to do this in
> > nginx!
> >
> > Steve
> >
> >
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

-- 
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa



More information about the nginx mailing list