Forum

urltollkit for wordpress multisite - subdirectories

Fred
19 May 2015, 13:20
Hi Hugo,

After about 3 weeks, I have finally managed to get my wordpress 4.2.2 multisite installation using subdirectories (rather than subdomains) to work.
Here is the urltollkit that I had to use:
UrlToolkit {
ToolkitID = wp-multi-subdir
Match ^/index\.php$ Return
Match ^/([_0-9a-zA-Z-]+/)?wp-admin$ Redirect /$1wp-admin/
RequestURI exists Return
Match ^/([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) Rewrite /$2
Match ^/([_0-9a-zA-Z-]+/)?(.*\.php)$ Rewrite /$2
Match ^/[_0-9a-zA-Z-]+(/wp-.*) Rewrite /$1 # if not present 404 - error is displayed
# Match ^/[_0-9a-zA-Z-]+(/.*\.php)$ Rewrite /$1 #test
Match .* Rewrite /index.php?$1
}


I have tested it extensively and I really feel that it should go on your "HOWTO: URL rewrite rules" page as I believe other people is struggling in figuring this out

Thank you for all you patience, help and support so far
Hiawatha version: 9.12
Operating System: FreeBSD 10.1
Hugo Leisink
19 May 2015, 21:20
Thanks! I've added it to the HOWTO page.
This topic has been closed.