typecho开启地址重写静态 提示404 not found
解决办法,需要在站点根目录下添加.htaccess文件即可
RewriteEngine On
RewriteBase /
RewriteCond %{http_host} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{http_host}/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
其他说明:
RewriteCond %{http_host} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{http_host}/$1 [L,R=301]
这两行代码是 让非www跳转到www的域名下。