Pseudo static rule of Typecho
Apache
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !- f RewriteCond %{REQUEST_FILENAME} !- d RewriteRule ^(.*)$ /index.php/$1 [L] RewriteCond %{SERVER_PORT} !^ 443$ RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L, R] </IfModule>
Nginx
location / { index index.html index.php; if (-f $request_filename/index.html) { rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php) { rewrite (.*) $1/index.php; } if (!- f $request_filename) { rewrite (.*) /index.php; } }