1、首先在根目录下新建一个 .htaccess 的文件 2、然后再里面写上: RewriteEngine On RewriteCond % !-f RewriteCond % !-d RewriteRule . / [L] 3、再在 中写上 4、运行,你会有惊喜的发现(成功了)。 5、运用 PHP 的相关函数分析 URI 再查询数据库,这样伪静态就做好了。 6、我的博客就是通过 PHP Apache 伪静态做出来的,是 domain/postname 的这种形式。
让更多人参与回答