# Moodle Rewrite Rule

**URL:** <https://www.ruby-forum.com/t/moodle-rewrite-rule/214989>\
**Category:** NGINX\
**Created:** [December 18, 2011, 6:17pm UTC](https://www.ruby-forum.com/t/moodle-rewrite-rule/214989 "2011-12-18T18:17:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [December 18, 2011, 6:17pm UTC](https://www.ruby-forum.com/t/moodle-rewrite-rule/214989/1 "2011-12-18T18:17:44Z")

</div>

I emailed the group earlier regarding Nginx and Moodle, but have more  
specific information.

From the Moodle documentation, they are saying that:

“Your web server needs to be configured to allow the part of the URL  
after  
a script name to be passed directly to the script.”

and that in order to do that, the following Apache setting needs to be  
set:

_AcceptPathInfo_ on

and that this rewrite rule needs to be set up:

_RewriteRule_ ^([^?]+?.php)(/.+)$ $1?file=$2 [QSA]

How do I accomplish the same in Nginx?
