Apache Rewrite:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]

Nginx Rewrite:

#ignored: "-" thing used or unknown variable in regex/rew 
if (!-f $request_filename){
	set $rule_1 1$rule_1;
}
if (!-d $request_filename){
	set $rule_1 2$rule_1;
}
if ($rule_1 = "21"){
	rewrite /. /index.html last;
}
© 版权声明
评论 抢沙发

请登录后发表评论