由于typecho程序rewrite判断有问题,在后台开启rewrite会提示服务器不支持,请忽略他的警告,继续设置。并且手动在.htaccess文件添加rewrite规则。
1 2 3 4 5 6 7 8 9 10 11 12 13 |
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # BEGIN WordPress RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-httpd-php application/x-javascript # END |
规则借用了wordpress的,可以解决开启rewrite后404的问题。
发表回复