multisite permalinks: how to prepend all subsites urls with a virtual folder (4 posts)

  1. pixeline
    Posted 3 years ago #

    For our school we use a wordpress network. The main domain gives access to general information and sub-sites are specific projects managed by students.

    I would like that all sub-sites have their url appended with a fake folder name.


    Say the main domain is school.edu

    Currently, my sub-sites permalinks are


    I would like that they becomes:


    How can i do it?

    I tried adding this in a .htaccess. It redirects correctly but then the url is changed back to the "real" one.

    RewriteRule ^projects/([_0-9a-zA-Z-]+/)? $1 [R=301,L]

  2. Doesn't work that way. You'd want to use a multinetwork plugin, make a network called projects, and put those sites in there.

  3. pixeline
    Posted 3 years ago #

    Your solution makes sense, but it seems 3.5 has issues in multisites mode. I tried that and the subnetwork never gets created.

  4. Jesús Franco
    Posted 3 years ago #

    @pixeline I've done funny things with rewrite rules before, and it's not really the best way to go, however if you really need that support, you could try pruning the Redirection flag of your rewrite rule, that way the redirection it's going to be transparent to the user (the won't see the "real" URL). However I don't know if it could create conflicts with your permalinks.

Topic Closed

This topic has been closed to new replies.

About this Topic