>

.htaccess

Changing WordPress Permalinks

Permalink: Short for permanent link, a permalink is a direct link to a single entry on content on a blog. As a blog is updated with a new post, that specific post will get its own page with a URL that can be used rather than linking to the main URL of the blog. On many blogs the text “permalink” will appear below a blog post as a hyperlink that takes users to the post as its own page.

By default WordPress uses web URLs which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links.

I prefer to use the file name as the permalink, e.g. Permalink: http://futureskills.net/changing-wordpress-permalinks

To achieve this you have to do two things:

  1. You have to change the permalink settings in WordPress
  2. You have to add some information to the .htacess file.

Change Permalink settings in WordPress

In the WordPress Dashboard:

  • Click on Settings, Choose Permalinks
  • Select the radio button next to Post. This converts the permalink to the title of your post.
Wordpress Permalinks

Using the post name as the permalink

 

 

 

Adding Re-Write rules to .htaccess file

Open the .htaccess file in the root directory of your site and add, the following code:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

What is .htaccess? 

Learn more over here

What if your site is hosted on IIS7?

Just open the IIS Manager > Click on the site > Then click on URL Rewrite > Import rules

You can import the rules you have from the .HTACCESS to your IIS