How can I redirect www to non www site?

I just moved from Movable Type to a category-based Wordpress site and am now having redirect issues. Help me push my users to the right place!

  • I just moved from Movable Type to a category-based Wordpress site and am now having redirect issues. Help me push my users to the right place! I recently moved my site from Movable Type to a category-based Wordpress site (This is work related so I won't post the site here. but mefi mail me if you need it). To perform the migration, I used the http://wordpress.org/extend/plugins/movabletype-importer/. After the migration was compete, I categorized the content where necessary. After this process, I changed the Wordpress category base from "Category" to "cat", as this will make more sense to my users. This went well, but I am having an issue now with how to set up some redirects. Old Movable Type site: - www.site.com/cat = old homepage - www.site.com/cat/2012/11/sample-blog-post.html New Wordpress site: - site.com/ -- /cat is the wordpress category base, e.g. site.com/cat/apples, site.com/cat/oranges - site.com/sample_blog_post www.site.com/cat still shows up in Google searches for my site. For some reason, old movable type content is being served up at this address. On my server, I renamed the cat/ directory (a relic from Movable Type) to OLD-cat/. Now, when users go to www.site.com/cat, they see www.site.com/cat in the browser. I want them to see www.site.com (my Wordpress site). This 301 redirect in the .htaccess file at the root of my site: Redirect 301 /cat/ / ...broke my Wordpress category base, so that site.com/cat/apples no longer worked. Is there a way to set up a redirect or similar so that users who go to site.com/cat will be pushed to site.com, in a way that won't mess with the category base I have chosen? I also have hundreds of blog posts that look like this: www.site.com/cat/2012/11/sample-blog-post.html Is there a way to set up a redirect that will push users who enter addresses that look like this in the browser (www.site.com/cat/2012/11/sample-blog-post.html ) to the corresponding Wordpress location (site.com/sample_blog_post). I am a newcomer to using server redirects and I could use some help addressing these problems. Thank you mefites :o)

  • Answer:

    I've used this http://urbangiraffe.com/plugins/redirection/ successfully.

radiocontrolled at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

For your redirect Redirect 301 /cat/ / I think what you want is RedirectMatch 301 ^/cat/$ / or RedirectMatch 301 /cat/$ http://example.org/ -- that way the /cat/ redirect doesn't prevent /cat/ based links from working.

artlung

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.