I have created permalinks in my blog. Previously, I didn't know how to make it works because I guessed that it would work by just adding a
.htaccess file in my blog directory. But it didn't work! So, here is the way to solve that problem (for your information, I use Apache 2.2.8 as web server with PHP 5.2.5 module installed here):- When you activate your permalinks, make sure that you have set your
.htaccessfile to be writable (e.g.: by changing permission in command line interface withchmod 766 .htaccess). If your Wordpress application have permission to write your.htaccessfile, its content will be:
# BEGIN WordPress
RewriteEngine OnRewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress
- Make sure that you have defined
rewrite modulein your Apache web server configuration (httpd.conf):
RewriteEngine On RewriteRule ^/~([^/]+)/?(.*) /u/$1/$2 [R] RewriteRule ^/([uge])/([^/]+)$ /$1/$2/ [R]
- Do not forget to change the value of
AllowOverrideparameter in<Directory "[root_directory]" />tag fromNonetoAlland also yourOptionsparameter fromNonetoIndexes FollowSymLinksas it will pay attention to your.htaccessfile. Here is actually the key, because if you do not change this value, your.htaccessfile will be useless.[root_directory]is the directory where you put your Wordpress source. So, the content of<Directory "[root_directory]" />tag in your web server configuration file will be:
Options -Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all
- Restart your Apache web server via command line interface
#apachectl restart
- Now, try to test your permalink
So, if your permalink activation is success, you do not have to access your blog post like this
http://blog.knightdna.com/?page_id=k2, but you may access your blog into post date or category (it depends on your setting in permalink activation) like this http://blog.knightdna.com/2008/02/27. If you do not know how to activate your permalink, just go to your administration page. Select Options then select Permalinks. After it you may customize your permalink structure.This is all my post about activating the Wordpress permalink, especially if your blog is not hosted on wordpress.com. I hope that this trick will be helpful for you. Happy surfing and have a nice day :D
-KnightDNA-









