Skip to content

Instantly share code, notes, and snippets.

Leon leonsim

Block or report user

Report or block leonsim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View nginx2apache.py
import re
FILE_PATH = 'nginx-rewrite.txt'
RR = 'RewriteRule'
def relate(r):
ans = re.findall(r'rewrite\s*([^\s]+?)\s*([^;\s]+?);', r)
assert len(ans) == 1
return ans[0]
def solve(l, rs):
You can’t perform that action at this time.