设置Wordpress的Pretty Permalink的关键点莫过于下面几点(本文是基于Apache httpd服务器)。

1、Apache httpd要有rewrite module

在httpd服务器的httpd.conf配置文件中把"LoadModule rewrite_module modules/mod_rewrite.so"解除注释。
如果没有mod_rewrite.so模块,那么就要先把rewrite模块先给安装了。

2、在httpd配置文件中,配置项目目录

在项目目录下加入

Options FollowSymLinks
AllowOverride All

3、在wordpress的文件夹加入.htaccess文件

.htaccess文件内容如下:

RewriteEngine On

RewriteBase /wordpress/

RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /wordpress/index.php [L]

4、如果还不懂那么就参考http://codex.wordpress.org/Using_Permalinks。

相关文章:

  • 2021-07-30
  • 2021-05-26
  • 2022-12-23
  • 2021-12-01
  • 2021-05-28
  • 2021-12-31
  • 2021-12-31
  • 2021-08-17
猜你喜欢
  • 2021-11-13
  • 2022-12-23
  • 2022-01-14
  • 2021-07-08
  • 2022-12-23
  • 2021-08-27
相关资源
相似解决方案