Rewrite lookup via MySQL table

btafoya nginx-forum at nginx.us
Tue Aug 24 22:41:46 MSD 2010


Forgot to show what the target path is now:

http://fcdev.premasolutions.com/catalog/product/view/id/9746/category/743

btafoya Wrote:
-------------------------------------------------------
> I have the php code working to redirect correctly,
> but have run into a obstacle I don't know how to
> resolve....
> 
> The is the incoming URL, or one of them...
> 
> http://fcdev.premasolutions.com/alice-in-wonderlan
> d-movie-deluxe-alice-adult-costume.html
> 
> I have tried to intercept it but just created a
> loop. The handler I wrote is index_loader.php.
> 
>     location ~ \.html/ { ## Forward
>         rewrite ^(.*)/
> index_loader.php?source_url=$1 last;
>     }
>     
>     location @handler { ## Magento uses a common
> front handler
>         rewrite / /index.php;
>     }
> 
>     location ~ \.php/ { ## Forward paths like
> /js/index.php/x.js to relevant handler
>         rewrite ^(.*\.php)/ $1 last;
>     }
> 
> How do I go about redirecting all .html traffic to
> the new handler without interfering with the
> Magento front controller?
> 
> Thanks again for everyone's help!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,122977,123234#msg-123234




More information about the nginx mailing list