由于是英文版的,好不容易才找到在哪里设置。这个是用到apache的.htaccess 。
系统要求:
- Apache web server with the mod_rewrite module installed
- In WordPress’s home directory,
- The FollowSymLinks option enabled
- FileInfo directives allowed (e.g.
AllowOverride FileInfo
,AllowOverride All
) - An .htaccess file (if this file is missing, WordPress will try to create it when you activate “pretty” permalinks)
- If you want WordPress to update the .htaccess file automatically, WordPress will need write access to the file.
这是我做的修改:
- <Directory “/www/blog”>
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
wordpress 的永久链接还是用的域名+文章名.html 的形式,但是由于文章名都为中文,这就让URL显得非常难看。不过发现在设置永久链接的形式为:%postname%.html的形式后,在每篇文章的名称后面都有一个可以修改Permalinks的地方,也很方便。