Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-26-2012, 07:50 AM   PM User | #1
joliett89
Regular Coder

 
Join Date: Jul 2011
Posts: 172
Thanks: 64
Thanked 2 Times in 2 Posts
joliett89 has a little shameless behaviour in the past
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: "www.domain-name.com"
all other sites: "subdomain-name.domain-name.com"

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

http://domain-name1.com/
http://domain-name2.com/
...
http://domain-name100.com/

2) Currently urls on all blogs are set to:

http://domain-name.com/2012/10/26/post-name
http://domain-name.com/category/category-name

(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:

http://domain-name.com/post-name
http://domain-name.com/category-name

...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})/(.*)$ http://domain.com/$4 [L,R=301]
Code:
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ http://domain.com/$4 [L,R=301]
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.
joliett89 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:34 PM.


Advertisement
Log in to turn off these ads.