Friendly URLs in WordPress (Apache2 / Linux)
Here is a simple step-by-step to enable more readable and more search engine friendly URLs on your WordPress blog. This guide is for people running WordPress 2 and Apache2 on Linux. I wrote this because I could not find a simple step-by-step for Apache2 on WordPress’s website.
BEFORE: http://www.doctort.org/adam/?p=5
AFTER: http://www.doctort.org/adam/nerd-notes/friendly-urls.html
Step 1: Enable mod_rewrite
$ cd /etc/apache2/mods-enabled $ sudo ln -s ../mods-available/rewrite.load ./ $ sudo /etc/init.d/apache2 reload
Step 2: Create an .htaccess file
$ cd /var/www/html/ $ sudo touch .htaccess $ sudo chown www-data.www-data .htaccess
Step 3: Enable nice permalinks in WordPress
- Go to Options / Permalinks on the WordPress admin menu
- Click the custom radio button
- Type the following into the custom field: /%category%/%postname%.html
- Click Update Permalink Structure.

Pingback by Wordpress, Apache2, Mod_Rewrite, and Linux « Mike Conley’s Blog — 13 February 2009 @ 11:25 am
[...] …and it actually took a bit of figuring out. Thankfully, I found this blog entry to help me. [...]