Need to change some rewrite rules from apache to nginx for request_uri
February 23, 2011 09:15AM
Hi Experts,

I have to convert below apache config into nginx. I am having trouble to convert these rewrite rules into nginx. Please anyone help me on this.

<VirtualHost *>
DocumentRoot /var/www/html/downpage
CustomLog /var/log/httpd/downpage/access Combined
ErrorLog /var/log/httpd/downpage/error_log

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/server-status
RewriteCond %{REQUEST_URI} !maintenance.png
RewriteCond %{REQUEST_URI} !^/index.html
RewriteRule ^/(.*) http://%{HTTP_HOST}/index.html [L]

<Directory "/var/www/html/downpage">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all


Thanks in advance.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 96
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready