0

I'm trying to setup a Wordpress Subdirectory multisite that can support deep urls. By deep urls, I mean the the sites should be able to have more nested parts. E.g

https://example.com/path/nested/demo

I was able to achieve this with using Paulhund's tutorial but this guide works only for Apache servers. How can this be adapted for NGINX servers? Here's a snippet of my .htaccess code below. Also if there is a different approach to achiveing this in general, I'm open to suggestions. Thanks.

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^(.+)?/(wp-.*) /$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
3
  • the article you linked to is a 404 not found, can you explain what you mean by deep link as it could mean multiple things?
    – Tom J Nowell
    Mar 1 at 20:26
  • is it this article? paulund.co.uk/wordpress-multisite-with-nested-folder-paths If so it's a very very old article, and things have changed a lot since then. The solution to your question might just be to go into the network admin and edit the sites URL to what you wanted. In 2013 core wasn't as flexible with URLs requiring plugins such as WP MU Domain mapping that are no longer necessary
    – Tom J Nowell
    Mar 1 at 20:29
  • 1
    @TomJNowell Thanks for your response, I have edited my question to give better clarity and context on what I meant by deep urls.
    – Itse Sagay
    Mar 1 at 20:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.