Link to home
Start Free TrialLog in
Avatar of Number5ix
Number5ixFlag for Australia

asked on

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

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
Avatar of tpraveenraj
tpraveenraj
Flag of India image

This'll help u
Options +FollowSymLinks
RewriteEngine On

RewriteRule ^/$ /technical

Open in new window

Avatar of Number5ix

ASKER

Won't that redirect ALL requests for /* to /technical/* though?  I don't want to do that ...
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
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.
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

No, that produces an HTTP 500 error.
ASKER CERTIFIED SOLUTION
Avatar of tpraveenraj
tpraveenraj
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks tpraveenraj.

Could you please explain what each of those lines does?
Avatar of Jason C. Levine
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.