Support » Networking WordPress » multisite permalinks: how to prepend all subsites urls with a virtual folder

  • 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.

    example

    Say the main domain is school.edu

    Currently, my sub-sites permalinks are

    school.edu/project1/
    school.edu/project2/

    I would like that they becomes:

    school.edu/projects/project1/
    school.edu/projects/project2/

    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]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Doesn’t work that way. You’d want to use a multinetwork plugin, make a network called projects, and put those sites in there.

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

    @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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘multisite permalinks: how to prepend all subsites urls with a virtual folder’ is closed to new replies.