Browse Source

Changed localDir default to empty

No more double slashes
master
parent
commit
665fcb561d
2 changed files with 3 additions and 3 deletions
  1. 2
    2
      README.md
  2. 1
    1
      proxy.php

+ 2
- 2
README.md View File

@@ -40,9 +40,9 @@ Where:
40 40
 
41 41
 * `example.com` is the target hostname
42 42
 * `80` is the target port (default: `80`)
43
-* `/remoteDir` is the directory to point on on the target (default: `/`)
43
+* `/remoteDir` is the directory to point on on the target (default: ``)
44 44
 	* For example, if set to `/superapplication`, it will redirect to `example.com/superapplication`
45
-* `/localDir` is the directory that contains the file.
45
+* `/localDir` is the directory that contains the file (default: ``)
46 46
 	* For example, if you need to type `mydomain.com/superproxy/index.php` to access this file, set this to `/superproxy`
47 47
 
48 48
 Then, create the `.htaccess` file in order to redirect every request made in `localDir` to `index.php` that will handle it. In most situations, you will onyl need the following line.

+ 1
- 1
proxy.php View File

@@ -1,7 +1,7 @@
1 1
 <?php
2 2
 
3 3
 class Proxy {
4
-    public function __construct($serv, $port = 80, $root = '/', $localRoot = '') {
4
+    public function __construct($serv, $port = 80, $root = '', $localRoot = '') {
5 5
         // Functions
6 6
         function str_replace_once($search, $replace, $subject) { // TODO Credit
7 7
             $pos = strpos($subject, $search);

Loading…
Cancel
Save