-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathindex.php
66 lines (64 loc) · 2.2 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
if (!empty($_POST['rules'])) {
error_reporting(E_ALL & ~E_NOTICE);
require_once 'rew.phps';
$RC = new rewriteConf($_POST['rules']);
$RC->parseContent();
$RC->writeConfig();
exit($RC->confOk);
}
?><!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Rule convertor, convert apache htaccess rewrite rules to nginx rewrite rules automatically</title>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Apache2Nginx rules converter</h1>
<i>attention: not so much beta, but check twice before using!</i>
</header>
<section>
<article id="apache">
<h2>Apache Rewrite Rules</h2>
<textarea placeholder="Paste your rules here"></textarea>
</article>
<div id="loader">
<div class="loader-inner pacman">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<article id="nginx">
<h2>Nginx converted Rules</h2>
<textarea placeholder="The magic will appears there"></textarea>
</article>
</section>
<aside>
<p>
<strong>Will you make the codes public?</strong>
Please check <a href="https://github.com/mow/apache2nginx">https://github.com/mow/apache2nginx</a> also you can contact from: anil(at)saog.net
</p>
<p>
<strong>Donations?</strong>
Yes I accept donations. Please use my paypal account: pp(at)saog.net
</p>
<p>
<strong>Does it supports xxx?</strong>
This page has woozy codes, I dont know try it yourself and see. Backreferances, most of the variables and a
few flags are supported.There are tons of fancy hacks for catching rewrite behavior of apache. As you see, it
highly uses variables for deciding to rewriting and there must be many much errors/unmatched directives.
</p>
</aside>
<footer>
A converter by <a href="http://anilcetin.com">Mow</a> - UI by <a href="http://ownweb.fr">OwnWeb</a>
</footer>
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
<script src="app.js"></script>
</body>
</html>