Advertisement

.htaccess, the file which control the Apache webserver, is very useful and allows you to do a lot of things. In this article, let’s see how .htaccess can help you with your WordPress blog, for both security,functionnality and usability.

When editing or modifying the .htaccess file of your WordPress blog, make sure to always have a backup that you can restore in case of something went wrong.

1 – Redirect WordPress RSS feeds to feedburner with .htaccess

Which blogger doesn’t use feedburner? Sure, feedburner is a very nice service, allowing you to know how many people suscribed to your rss feeds. The only problem is that you must edit your theme files to manually change the rss url. Happilly, there’s a nice hack, using .htaccess, which will make you save a lot of time!

Don’t forget to modify line 6 before applying this code!

# temp redirect wordpress content feeds to feedburner

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{HTTP_USER_AGENT} !FeedBurner    [NC]

RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]

RewriteRule ^feed/?([_0-9a-z-]+)?/?$ http://feeds2.feedburner.com/glanceworld [R=302,NC,L]

</IfModule>

2 – Remove /category/ from your WordPress url

By default, WordPress category permalinks are displayed that way:

https://glanceworld.com/category/wordpress

As you can see, the category in the url is pretty useless. Here’s how to remove it:
First backup your .htaccess file. Then, open it and append the following line:

RewriteRule ^category/(.+)$ http://www.yourblog.com/$1 [R=301,L]

Once saved, your categories pages will be displayed like this:

https://glanceworld.com/wordpress

3 – Using browser cache

A very good way to optimize your blog loading time is to force the use of the browser cache. This code will not improve your blog loading time directly, but it will sav

Previous articleSecure your WordPress Blog with 10 easy steps
Next articleWordPress 2.8 Beta 1 Available for Download

LEAVE A REPLY

Please enter your comment!
Please enter your name here