Forum: NGINX Kindly help me convert this htaccess to nginx directives?

Posted by ubunifu (Guest)
on 2013-03-07 21:40
(Received via mailing list)
ErrorDocument 404 /
ErrorDocument 500 /

Options +FollowSymlinks
RewriteEngine on
RewriteBase /

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^([^\.\/\-]+)$ $1.php [L]

RewriteRule ^videos/([^\.\/]+)$ /video-file.php?id=$1 [L]
RewriteRule ^audios/([^\.\/]+)$ /audio-file.php?id=$1 [L]
RewriteRule ^notes/([^\.\/]+)$ /note-file.php?id=$1 [L]
RewriteRule ^exercises/([^\.\/]+)$ /exercise-file.php?id=$1 [L]
RewriteRule ^links/([^\.\/]+)$ /link.php?id=$1 [L]
RewriteRule ^class/([^\.\/]+)$ /class.php?slug=$1 [L]
RewriteRule ^subject/([^\.\/]+)$ /subject.php?slug=$1 [L]
RewriteRule ^author/([^\.\/]+)$ /author.php?username=$1 [L]

RewriteRule ^search/([^\.]+)$ /search.php?query=$1 [L]

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,237098,237098#msg-237098
Posted by Jonathan Matthews (Guest)
on 2013-03-08 00:04
(Received via mailing list)
Why don't you show us what you've tried; what hasn't worked; and where
you got stuck?

That way, *you* get to learn about nginx, and *we* don't waste our
time a) repeating things you've already managed to do and b) doing
your job for you!

Cheers,
Jonathan
--
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.