WordPress and Permalinks

February 4th, 2009 § Leave a Comment

How to switch from unfriendly URLs to friendly ones, e.g.:

http://bernhard.hensler.net/blog/?p=1001 
becomes

http://bernhard.hensler.net/blog/post-with-friendly-url

Instructions for SUSE Linux, a very good reference can be found here (in german):

  • in Settings/Permalinks change to: Custom Structure=/%postname%/
  • edit /etc/sysconfig/apache2

##
APACHE_MODULES=”access actions alias auth auth_dbm autoindex cgi dir env expires headers include log_config mime negotiation setenvif ssl suexec userdir php4 rewrite
##

modules added
modules removed: mod_suphp

  • edit /etc/apache2/httpd.conf – add lines in red

#VHOST hensler.net
<VirtualHost *:80>
php_admin_value open_basedir /home/h/hensler.net/public_html/:/usr/local/lib/php:/tmp
DocumentRoot /home/h/hensler.net/public_html/
ServerName www.hensler.net
IndexOptions
DirectoryIndex index.htm index.html index.shtml start.htm start.html start.shtml index.php index.php3
ServerAlias hensler.net henslernet.h969344.serverkompetenz.net *.hensler.net www.hensler.net
CustomLog “|/usr/local/visas/cronolog/cronolog –symlink=/usr/local/visas/logfiles/hensler.net/access_log –prev-symlink=/usr/local/visas/logfiles/hensler.net/current_access_log /usr/local/visas/logfiles/hensler.net/%Y/%m/%d/access_log” combined
SuexecUserGroup hensler www
ScriptAlias /cgi-bin/ /home/h/hensler.net/public_html/cgi-bin/
<Directory /home/h/hensler.net/public_html/>
Options FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

</VirtualHost>
#/VHOST

  • to restart apache: /usr/sbin/rcapache2 restart
  • I did not have to convert existing posts with the help of any plugins
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading WordPress and Permalinks at Bernhard Hensler.

meta

Follow

Get every new post delivered to your Inbox.