mod_rewrite & migration from Wordpress to Wordpress MU - How to redirect specific URLs?

Number5ix
Number5ix used Ask the Experts™
on
Hi all,

I'm running a Wordpress blog in the root site of my domain right now but I want to move it to Wordpress MU and setup a new blog containing all the old info that is accessible by going to /technical.  I know how to do this using mod_rewrite so that all requests for / go to /technical but I want to run another site in the root.  For that reason redirecting ALL requests for / to /technical won't work.

How can I use mod_rewrite to redirect only certain addresses if I don't know what those addresses are?

Sorry if that doesn't make sense so please ask any questions necessary.

Thanks!
Chris
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
This'll help u
Options +FollowSymLinks
RewriteEngine On

RewriteRule ^/$ /technical

Open in new window

Author

Commented:
Won't that redirect ALL requests for /* to /technical/* though?  I don't want to do that ...

Commented:
Maybe you should wait another month since MU has been merged into Wordpress 3.0

In the meantime, 3.0 Beta 1 is available if you want to check it out

Download: http://wordpress.org/wordpress-3.0-beta1.zip

Enable MU: http://wptheming.com/2010/03/wordpress-3-0-enable-network/

Here's some more info from the codex

http://codex.wordpress.org/User:Andrea/Create_A_Network
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Author

Commented:
Sure, I can understand the reasoning behind waiting for WP 3.0 but that doesn't solve the problem - I'd still need to configure mod_rewrite so that my old addresses are redirected to the new ones.

I guess I could just use mod_rewrite to rewrite my category names???  It's not dynamic though, that's my only concern.

Author

Commented:
Ok,  how about I reword this slightly ...

http://domain.com/category/design/

SHOULD BECOME

http://domain.com/technical/category/design/

Does that make more sense?  :)
Then try this, it'll help u
Options +FollowSymLinks
RewriteEngine On

RewriteRule ^category/design/$ /technical/category/design/

Open in new window

Author

Commented:
No, that produces an HTTP 500 error.
Suppose the your site www.test.com point out to the files inside “new” folder.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^test\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.test\.com$
RewriteCond %{REQUEST_URI} !^/new/
RewriteRule (.*) /new/$1

Author

Commented:
Thanks tpraveenraj.

Could you please explain what each of those lines does?
Jason C. LevineDon't talk to me.

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial