eHow launches Android app: Get the best of eHow on the go.

How To

How to Fix Your Ugly Permalinks

Member
By profwebs
User-Submitted Article
(2 Ratings)
Is this what your blog URL's look like?
Is this what your blog URL's look like?
http://www.profwebmarketing.com

Are you still using the ugly permalink structure in your Wordpress powered blog? Well, assuming you have posts listed in the search engines, you can't just change your link structure or you visitors won't be able to find what they are looking for and you may even receive a penalty from the search engines for having broken pages.

Difficulty: Moderately Easy
Instructions

Things You'll Need:

  • notepad
  • access to the root of your site
  • your Wordpress site MUST be hosted on an Apache server to follow this guide
  1. Step 1
    Wordpress Control Panel
     
    Wordpress Control Panel

    First, log in to your WP control panel and select “permalinks” under the settings menu.

  2. Step 2
    permalink settings page
     
    permalink settings page

    Check the "Custom Structure" radio button and choose a new structure that you want to use for your URL's to make them pretty.

    Personally, I just use the name of the post in the url, but for maximum SEO benefit, you might want to use "category/post" structure. I.E. http://www.example.com/your-category/your-post/. However, to forward links to links with "cat/post" structure will take 1 line for each link you want to forward and is beyond the scope of this article.

    To use just the post name as your structure, put /%postname%/ in the "custom Structure" text box.

  3. Step 3

    This step is necessary to keep your visitors and the search engines from seeing broken pages.

    Download your current .htaccess file from your websites root folder. We will add 2 lines to this file to keep your links from breaking. This file opens with notepad and must be saved in its current form when done.

    If you were using the default links - http://example.com/?p=N - then this won't work for you. You must be using - http://example.com/year/month/day/post-name or http://example.com/year/month/post-name.

    If you are using http://example.com/year/month/day/post-name, then you want to add this to your .htaccess file:

    Redirectmatch 301 /([0-9]+)/([0-9]+)/([0-9]+)/(.*)$
    http://example.com/$4

    If you are using http://example.com/year/month/post-name, then you want to add this to your .htaccess file:

    Redirectmatch 301 /([0-9]+)/([0-9]+)/((.*)$
    http://example.com/$3

Tips & Warnings
  • replace example.com with your actual site url
  • ALWAYS make a copy of any files you edit
  • This may cause performance issues if you have a big site

Comments  

Flag This Comment

on 4/14/2009 Good article. 5* AND A RECOMMENDATION!

Flag This Comment

on 4/14/2009 Good article on fixing ugly permalinks in Wordpress. 5*

Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Internet Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy .   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. † requires javascript

Demand Media
eHow_eHow Technology and Electronics