apache下
#.htaccess RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]
httpd.conf
Options ExecCGI FollowSymLinks AllowOverride All Order allow,deny allow from all
nginx下
#nginx.conf location / { if (!-f $request_filename){ rewrite (.*) /index.php; } }
sae下
#config.yaml name: sunboyu version: 1 handle: - rewrite: if(!is_dir() && !is_file()) goto "index.php?%{QUERY_STRING}" - errordoc: 404 /404.php
转载请注明:爱开源 » wordpress在不同webserver下的重写规则和配置