For some reason I found this rule to be difficult but finally got it to work thanks to the internets. This is the only rule that worked within the NGINX configuration to get only the root URL to redirect to (in my case) a non-SSL location. Here’s the section:
server {
(..)
location / {
rewrite ^(/)$ http://www.domain.com/ permanent;
}
}
http://stackoverflow.com/questions/9336261/nginx-rewrite-only-when-root-domain
NSLayout
Great Post, can i use this code in footer?
David Westerfield
Fine by me! Just config code 🙂 Also … I used to do minor development in Magento myself 🙂