How to create SEF links for WordPress blog

Step1.

  1. Log on to WordPress admin.
  2. Go to Settings>Permalink Settings.
  3. On Common settings choose Custom Structure
  4. Set /%postname%/ on input box given.
  5. Click Save Changes.

Step2.

Now add an .htaccess file on the blog’s root folder .

Put the following code in the .htaccess file

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /blog/

RewriteRule ^index\.php$ – [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /blog/index.php [L]

</IfModule>

Note:- here blog is root folder name for WordPress files.

 

Now follow the Step 3 if URL’s still not working. Your server may not have the AllowOverride directive enabled. In this case, .htaccess files are completely ignored.

Step3.

  1. logon to webmin.
  2. Click on Server from side menu.
  3. Click on Apache Webserver side menu.
  4. On Existing virtual hosts  tab Find servers where Server Name equals to <websitename.com>
  5. Click on the Virtual Server link for which port no is 80.

FYI,

  1. Port 80 is generally used for website.
  2. Port 443 is generally used for SSL.
  3. Now on Virtual Server Options; Click on Edit Directives.
  4. Add following code below the last Directory tag code to allow override.

<Directory /var/www/html/full_ path_ to_ the_ directory>

AllowOverride All

</Directory>

example-

<Directory /var/www/html/yoursite/blog>

AllowOverride All

</Directory>

  1. Save changes.
  2. You must restart your Apache server for any httpd.config file changes to take effect
  3. Carefully click on the Apply Changes RHS.

Hope this helps.. if still get sucked follow the link below.

http://codex.wordpress.org/Using_Permalinks

 

One thought on “How to create SEF links for WordPress blog

  1. Pingback: On page Optimization | The On Page SEO Basics | Sagebridge Digital | Sagebridge Digital