为Typecho、WordPress等博客框架开启伪静态去除链接中出现的index.php,并获得更好的SEONginx环境在nginx配置文件夹下(默认在/etc/nginx)进入sites-available,根据默认配置新建一个yourdomain.conf,在location /段加上# 伪静态重写 if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; } 或者try_files $uri $uri/ /index.php?$args;保存后将该文件链接到sites-enabled文件夹ln -s /etc/nginx/sites-available/yourdomain.conf /etc/nginx/sites-enabled/yourdomain.conf然后重启nginx即可Apache环境在网站根目录新建文件.htaccess,填入以下内容<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{
wyj5211
某二幺幺大学牛马