Network Troublshooting > Linux Servers Support

Wordpress multisite rewrite rules


1) I have a Wordpress multisite subdomain installation with about 100 sites in the network.

Network Admin - Sites (All Sites) shows them like this:

main site: ""
all other sites: ""

there is also a domain mapping plugin, so they all get access as separate urls:

2) Currently urls on all blogs are set to:

(I used today's date as an example)

This is also the way domains show in Google and Bing search results

3) I am going to remove "2012/10/26/" and "category/" from the urls, so they are gonna look like this:

...and I need to have a rewrite rule that takes care of redirecting people coming from serps to these new urls

4) I have something like this right now:

--- Code: ---RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$$4 [L,R=301]

--- End code ---

--- Code: ---RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$$4 [L,R=301]

--- End code ---

but I am not sure if it is correct / if it is gonna work right, and also I need to have a rule for all 100 websites, and not just one. These versions (only one of them was meant to be used) dont include the "category/" part either.

5) If somebody would have an idea how to do that it would be great.

Thank you in advance for any info.


[0] Message Index

Go to full version