Skip to content

Commit

Permalink
Merge pull request #24 from prisis/feature/new-Multisite-Directory-Re…
Browse files Browse the repository at this point in the history
…solver-Manager

update docs
  • Loading branch information
prisis committed Jul 23, 2015
2 parents a24c39d + 556355d commit 9d92e19
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,19 @@ composer require gwa/multisite-directory-resolver
```php
// project root: path/to/project
// wp install: path/to/project/custom/install/path
$mdr = new Gwa\Wordpress\MultisiteDirectoryResolver('custom/install/path');

// choose which resolver you like to use
// 1. MultisiteResolverManager::TYPE_FOLDER - Use only for sub folder url handling -> example.com/site1/../..
// 2. MultisiteResolverManager::TYPE_SUBDOMAIN - Use only for sub domain handling -> test.example.com

$mdr = new Gwa\Wordpress\MultisiteDirectoryResolver('custom/install/path', $resolver);
$mdr->init();
```

Set you cookie like this to resolve the wordpress multisite redirect Loop.

```php
$domain = $_SERVER[ 'HTTP_HOST' ];

define('COOKIE_DOMAIN', $domain);
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']);
define('ADMIN_COOKIE_PATH', '/');
```

Expand Down

0 comments on commit 9d92e19

Please sign in to comment.