Help me please to write nginx rewrites instead of that Apache htaccess:

 Options +FollowSymLinks
  RewriteEngine On
  RewriteBase /


  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)([^/])$ $1$2/ [R,L]

  RewriteCond %{ENV:REDIRECT_RDR} ^$
  RewriteCond %{HTTP_HOST} ^(.+)\.site\.com$
  #RewriteCond %2 !www
  RewriteCond %{HTTP_HOST} !^www\.site\.com$
  RewriteRule ^([a-zA-Z0-9`~!@#$%^&()\-+";=\\/|]*)$ blogs/fake/%2/$1 [L,E=RDR:1]


  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !/urlrewriteprepend.php$
  RewriteRule ^(.*)$ /urlrewriteprepend.php [L]
link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

Here is a link to the nginx HttpRewriteModule documentation - everything you need to know should be available in this document.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown