Title: Redirect everything?
Last modified: September 25, 2017

---

# Redirect everything?

 *  Resolved [webmaster](https://wordpress.org/support/users/woodwc/)
 * (@woodwc)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/redirect-everything/)
 * Please excuse the total-newbie question . . . my small academic center has a 
   site that I personally hosted some years at [http://williamcwood.com/econed](http://williamcwood.com/econed).
   Now I have the site properly up and running with my unversity’s hosting at [http://sites.jmu.edu/econed](http://sites.jmu.edu/econed).
   All I want to do is 301-redirect everything to the new site. I find that I can
   easily redirect the main welcome sticky post, [http://williamcwood.com/econed/2015/06/welcome/](http://williamcwood.com/econed/2015/06/welcome/)—
   but when visitors go to [http://williamcwood.com/econed](http://williamcwood.com/econed),
   they stay there rather than redirecting.
 * Thanks . . .
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fredirect-everything%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [meistervu](https://wordpress.org/support/users/meistervu/)
 * (@meistervu)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/redirect-everything/#post-9529605)
 * Have you tried using a regular expression instead of simple matching. Here is
   the link to the doc:
 * [https://urbangiraffe.com/plugins/redirection/](https://urbangiraffe.com/plugins/redirection/)
 * Within that doc, there is an example of how you capturing a group of characters
   from the original URL and use it to build the new URL:
 * > A couple of examples:
   > /blog/(.*) => /$1
   >  This will match any URL that starts with /blog/, and will
   > redirect it to the same URL but without /blog/. For example, /blog/2006/10/
   > 01/mypost will be redirected to /2006/10/01/mypost.
   > /2006/month_(\d+)/(.*) => /2006/$1/$2
   >  This will match any URL that starts /
   > 2006/month_, and is then followed by a number. This will be redirected to the
   > same URL, but without month_. For example, /2006/month_1/something will be 
   > redirected to /2006/1/something.
   > To replace a single dash in a URL with a space:
   > /tags/(.*?)-(.*?) => /tags/$1%20$2
 *  Thread Starter [webmaster](https://wordpress.org/support/users/woodwc/)
 * (@woodwc)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/redirect-everything/#post-9531113)
 * That looks like a good way to selectively refer visitors to certain pages on 
   the new site — but is there an easier way to just “redirect everything”?
 * (Background: Both of these sites have been subject to various attacks in the 
   past year, taking one or the other of them down . . . my goal is to keep them
   both “sort of” ready-to-go in case of future attacks. The “official” address 
   is [http://cob.jmu.edu/econed](http://cob.jmu.edu/econed) and it just redirects
   to whichever of the sites is active at the time . . . should I just give up, 
   trust backups of the one site and clean out its folder so that a standard redirect
   there will work? If I renamed public_html to publicx_html on the backup site 
   and just left everything there, would that work? Quick renaming to get it back?)
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/redirect-everything/#post-9567112)
 * The regular expression `/.*` will match everything
 *  Thread Starter [webmaster](https://wordpress.org/support/users/woodwc/)
 * (@woodwc)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/redirect-everything/#post-9567712)
 * Somehow it’s still not working. In the Redirection plugin at [http://williamcwood.com/econed](http://williamcwood.com/econed),
   I’m redirecting
 * /.*
 * to
 * [http://sites.jmu.edu/econed](http://sites.jmu.edu/econed)
 * but going to [http://williamcwood.com/econed](http://williamcwood.com/econed)
   still loads that native page at williamcwood.com/econed.
 * Screenshot at [this location](http://sites.jmu.edu/econed/files/2017/10/Untitled.png).
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/redirect-everything/#post-9630801)
 * Did you enable the regex checkbox? The screenshot is too small to tell
 *  Thread Starter [webmaster](https://wordpress.org/support/users/woodwc/)
 * (@woodwc)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/redirect-everything/#post-9631499)
 * >_Did you enable the regex checkbox? _
 * Ah! That did it! Thank you!
 * So, for those who get this far here’s the solution: I installed the Redirection
   plugin and at the originalsiteURL installation of WordPress redirected
 * /.*
 * to
 * newsiteURL
 * AND checked the RegEx checkbox.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Redirect everything?’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

## Tags

 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * 6 replies
 * 3 participants
 * Last reply from: [webmaster](https://wordpress.org/support/users/woodwc/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/redirect-everything/#post-9631499)
 * Status: resolved