Jump to content

How to Translate Apache's "RewriteRule" Into Nginx's "Rewrite


Recommended Posts

Hi

 

I am trying out Nginx and having problems with images.

 

I have found this article:

http://liangsun.org/posts/how-to-translate-apaches-rewriterule-into-nginxs-rewrite/

 

But whatever I try I cannot get images working.

 

Is problem maybe that prestahop is in sub directory like /shop?

 

In apache that would be:

RewriteRule . - [E=REWRITEBASE:/shop/]

 

If I am right , but what about nginx? How to set up it for sub directories?

 

Does anyone has complete config that is working?

 

Thanks

Link to comment
Share on other sites

  • 4 weeks later...

Same issue here, my full nginx config is:

 

http://pastebin.com/UgJj87ud

 

 

The images don't appear, I mean, not all of them. See attached screenshot.post-547495-0-52598300-1366792723_thumb.jpg

 

Edit: Also using cloudflare, but tried this config: http://www.prohost.b...p-nginx-config/ , same issue still.

Edit 2: Tried to set a subdomain without CloudFlare, same issue anyway.

Edited by mrgeneral (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...