URL rewriting for WordPress Network (Multisite) subsite

We have an install of WordPress Network (Multisite) that has multiple blogs running under the url blogs.exampleurl.com where each subsite is blogs.exampleurl.com/site1 /site2 etc...

We have a user that already has a URL (www.exampleurl.com/usersite/) and would like to keep his URL but also use our install of WordPress. Can this be done with any settings in WordPress, any plugins, or something else on the server?

For clarification, he doesn't want his URL to just redirect to the blogs. URL but instead maintain his URL while being served from the WordPress instance.

Topic plugins-url site-url url-rewriting plugin-recommendation Wordpress

Category Web


Here's an in-depth article on how to Rewrite WordPress Multisites: http://kunalnagar.in/blog/rewrite-wordpress-multisites/

Essentially, it explains how you can rewrite the various multisites to the same level as the root site i.e. if you have something like:

http://localhost/blog/ # Root Site
http://localhost/blog/site1/ # Multisite 1
http://localhost/blog/site2/ # Multisite 2

...you can change that to:

http://localhost/blog/
http://localhost/site1/
http://localhost/site2/

Hope this helps!


Just use the domain mapping plugin. It odes what you want and yes it works on subfolder sites.


This is straightforward if I understand the question properly. Use the "WordPress MU Domain Mapping" plugin:

http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

Update

I think something like the following should work in your .htaccess:

RewriteCond %{HTTP_HOST} www.exampleurl.com
RewriteCond %{REQUEST_URI} !^/testsite
RewriteRule ^(.*)$ testsite/$1 [L]

This will return the contents of the folder "testsite" for "www.exampleurl.com". And if you have:

www.exampleurl.com/myoldsite/

then I think it would return the contents of:

/testsite/myoldsite/

So I am guessing if you but Wordpress in that folder it should work. You might also need to map www.exampleurl.com to blogs.exampleurl.com using the domain mapping plugin.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.