Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am confused to convert this rules to nginx.

RewriteEngine On
RewriteCond %{REQUEST_URI} ^(.+)\~s$
RewriteRule ^(.*) stats.php?u=$1 [L]
RewriteCond %{REQUEST_URI} ^(.+)\~d$
RewriteRule ^(.*) delete_file.php?u=$1 [QSA,L]
RewriteCond %{REQUEST_URI} ^(.+)\~i$
RewriteRule ^(.*) share_file.php?u=$1 [QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !\.html$
RewriteRule ^(.*) file_download.php?u=$1 [QSA,L]

RewriteRule ^(.*).html$ $1.php [L]

Any help is appreciated.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.