mirror of
https://github.com/GeoffreyFrogeye/phroxyp.git
synced 2024-12-21 00:30:37 +01:00
Changed localDir default to empty
No more double slashes
This commit is contained in:
parent
81066fea32
commit
665fcb561d
|
@ -40,9 +40,9 @@ Where:
|
||||||
|
|
||||||
* `example.com` is the target hostname
|
* `example.com` is the target hostname
|
||||||
* `80` is the target port (default: `80`)
|
* `80` is the target port (default: `80`)
|
||||||
* `/remoteDir` is the directory to point on on the target (default: `/`)
|
* `/remoteDir` is the directory to point on on the target (default: ``)
|
||||||
* For example, if set to `/superapplication`, it will redirect to `example.com/superapplication`
|
* For example, if set to `/superapplication`, it will redirect to `example.com/superapplication`
|
||||||
* `/localDir` is the directory that contains the file.
|
* `/localDir` is the directory that contains the file (default: ``)
|
||||||
* For example, if you need to type `mydomain.com/superproxy/index.php` to access this file, set this to `/superproxy`
|
* For example, if you need to type `mydomain.com/superproxy/index.php` to access this file, set this to `/superproxy`
|
||||||
|
|
||||||
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.
|
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,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class Proxy {
|
class Proxy {
|
||||||
public function __construct($serv, $port = 80, $root = '/', $localRoot = '') {
|
public function __construct($serv, $port = 80, $root = '', $localRoot = '') {
|
||||||
// Functions
|
// Functions
|
||||||
function str_replace_once($search, $replace, $subject) { // TODO Credit
|
function str_replace_once($search, $replace, $subject) { // TODO Credit
|
||||||
$pos = strpos($subject, $search);
|
$pos = strpos($subject, $search);
|
||||||
|
|
Loading…
Reference in a new issue