Search code examples
wordpress.htaccessmod-rewritepermalinksmultisite

Wordpress Multisite url remapping


I'm currently using a complex multisite setup. I have the site as the landing page/blog and another site for the main functionality. The subdomain of the main site is set to /dashboard/ so every other page that loads after has the dashboard slug in it. IE www.name.com/dashboard/post-a-project.

Is there was a way to make the website appear as www.name.com/post-a-project while not interfering with the landing page site? This is mostly for aesthetic purposes.


Solution

  • Try and use this in your .htaccess file:

    RewriteEngine On
    RewriteRule ^dashboard/(.*)$ /$1 [L,R=302]
    

    I've set it to a temporary redirect using R=302. If this works for you then change it to R=301 to make it a permanent redirect.

    Make sure you clear your cache before testing this.