Title: Post Redirects?
Last modified: August 19, 2016

---

# Post Redirects?

 *  [davidthornton](https://wordpress.org/support/users/davidthornton/)
 * (@davidthornton)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/post-redirects/)
 * Not sure if that title accurately describes the issue I have — I’m a bit of a
   novice at all this.
 * I’ve been running my blog for a couple of years now, but last year moved it from
   one web host to another. In the process, some of the permalinks ended up different
   than they were originally.
 * My blog doesn’t see much traffic, but this presents a problem for a few posts
   that have been picked up & linked elsewhere on the net, and I get a number of
   visitors that end up hitting the 404 page because the permalink doesn’t match
   the current site structure. For example, one that I see pretty regularly is [http://www.domain_name.com/wordpress_folder_name/?p=221](http://www.domain_name.com/wordpress_folder_name/?p=221),
   but it should be pointing to [http://www.domain_name.com/YYYY/MM/DD/post-title/](http://www.domain_name.com/YYYY/MM/DD/post-title/)
 * Is there a way inside WordPress to make all clicks to [http://www.domain_name.com/wordpress_folder_name/?p=221](http://www.domain_name.com/wordpress_folder_name/?p=221)
   point to [http://www.domain_name.com/YYYY/MM/DD/post-title/](http://www.domain_name.com/YYYY/MM/DD/post-title/)?
   Or is that a web host DNS thing?
 * Thanks!

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

 *  [threestyler](https://wordpress.org/support/users/threestyler/)
 * (@threestyler)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/post-redirects/#post-788503)
 * You could either add a 404.php to your theme that redirects to your homepage 
   and/or you could manually 301 redirect each url by editing your .htaccess
 * Example:
 * > `Redirect 301 /wordpress_folder_name/?p=221 http://www.domain_name.com/YYYY/
   > MM/DD/post-title/`
 *  [Clicknathan](https://wordpress.org/support/users/clicknathan/)
 * (@clicknathan)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/post-redirects/#post-788504)
 * You can set that up in your .htaccess file, if you have the ability to edit that.
   You can add this code to the very end of the file:
 * `Redirect /wordpress_folder_name/?p=221 http://www.domain_name.com/YYYY/MM/DD/
   post-title/`
 *  Thread Starter [davidthornton](https://wordpress.org/support/users/davidthornton/)
 * (@davidthornton)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/post-redirects/#post-788717)
 * Hmm… The .htaccess redirect seems to only work to point to a specific directory.
   Since WordPress doesn’t actually create a directory for a post, the redirect 
   fails. Maybe I’ve got the syntax wrong? Should there be a carriage return between
   the old link and the correct link, or will a space work just as well?
 * The domain name points to the root of the WordPress directory, so I shouldn’t
   have to specify a folder… Or should I?
 * I tried `"Redirect /?p=189 /?p=191"` which gives a 500 Internal Server Error 
   page.
    I also tried `"Redirect http://www.domain_name.com/?p=189 http://www.domain_name.
   com/?p=191"` which gives a “Sorry, no posts were found” page. Just like not having
   a redirect there at all.
 * Post #191 is where I want the /?p=189 links to point. If I put `http://www.domain_name.
   com/?p=191` into a browser, it pulls the page up just fine, but `http://www.domain_name.
   com/?p=189` gives the “Sorry…” error page.
 * I’ve also set up a 404 that includes links, but lots of people hitting that don’t
   appear to move past that to go to the correct page. I’m wondering if putting 
   pictures in there would help.
 *  [Clicknathan](https://wordpress.org/support/users/clicknathan/)
 * (@clicknathan)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/post-redirects/#post-788774)
 * There should not be a carriage return, David. It should all be on one line with
   a space in the middle.
 * Just try “Redirect /?p=189 [http://domainname.com/?p=191&#8221](http://domainname.com/?p=191&#8221);
 * In other words, the relative directory for the first item and the full URL for
   the second. Not sure if this is necessary or not but it’s the way I do it and
   it always works like a charm.

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

The topic ‘Post Redirects?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [Clicknathan](https://wordpress.org/support/users/clicknathan/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/post-redirects/#post-788774)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
