homepage Welcome to WebmasterWorld Guest from 54.196.57.4
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Wordpress Permalink Migration & 301 Redirect in HTAccess
walkin




msg:3620031
 8:13 pm on Apr 5, 2008 (gmt 0)

Hi,

I recently changed the URL's of my site from
www.example.com/?p=x to www.example.com/test-post/

I made these changes 2 weeks back but now my google traffic has almost come down to 50% what it used to be before.

I also submitted my Sitemap to google but it has indexed only 149 URLs out of 1100 submitted. I am scared that I might lose my page rank.

Will a Permanent 301 Redirect solve the problem. I also tried this plugin but it does not work on my blog.
<snip>

Could someone help me with the code that I need to put in my HTAccess for the Permanent Redirect or if you have some other thoughts..

Any help will be greatly appreciated.

[edited by: jdMorgan at 2:14 am (utc) on April 6, 2008]
[edit reason] No URLs, please. example.com. [/edit]

 

jdMorgan




msg:3620159
 3:10 am on Apr 6, 2008 (gmt 0)

The answer --and the complexity of the answer-- depends on whether, in your example of an old URL, the query string was "p=test-post".

If so, then a relatively-simple mod_rewrite ruleset can be used to fix the problem. However, if a database lookup was used, and the old "p=" values were not the same as the new "virtual-directory" values (for example, if they were numeric), then the answer is complex and will require httpd.conf (server-configuration-level) access, a RewriteMap, and a small PERL script to do database lookups.

Jim

g1smd




msg:3620395
 5:55 pm on Apr 6, 2008 (gmt 0)

However you do it, the 301 redirect is a key element in the URL migration.

Not only does it signal to Google what to de-index and re-index, it also preserves traffic that tries to visit the old URLs.

walkin




msg:3620639
 6:26 am on Apr 7, 2008 (gmt 0)

Thanks for the prompt reply.

My Old URL's were like this
www.sitename.com/?p=11
www.sitename.com/?p=615

The Visitors who click on these indexed Pages in Google are able to see these pages as it is Handled by Wordpress but the Permanent 301 Redirect is not there which will help Search Engines.

Could you give more information regarding Steps or the code to be inserted in HTAccess to accomplish the 301 Redirect ?

Marcia




msg:3620649
 6:42 am on Apr 7, 2008 (gmt 0)

There's a Wordpress redirection plugin that manages 404 and 301 redirects when permalinks have moved. There might even be more than one available, since it's a common issue.

walkin




msg:3621499
 5:29 am on Apr 8, 2008 (gmt 0)

Could you please share the links for that Plugin. I have tried few plugins but they are not working in my case.

chazeo




msg:3623877
 7:29 pm on Apr 10, 2008 (gmt 0)

http://fucoder.com/code/permalink-redirect/

I have used this with great results

[edited by: jdMorgan at 11:30 pm (utc) on April 10, 2008]
[edit reason] de-linked. [/edit]

conor




msg:3624060
 10:45 pm on Apr 10, 2008 (gmt 0)

hta access should work fine

Marcia




msg:3624090
 11:11 pm on Apr 10, 2008 (gmt 0)

>>hta access should work fine

What the plugins are supposed to do is create the mod_rewrite for wherever it's necessary and hopefully deal with some specific WP issues, including the problem with (or without, as the case may be) trailing slashes.

It can save a lot of complicated busy work, especially when there are dozens or even hundreds of posts in different categories. Especially now, with the new release and upgrade to WP2.5 a lot of people are having problems with "disappearing" pages, and the fixes are more than likely software dependent.

[edited by: Marcia at 11:21 pm (utc) on April 10, 2008]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved