You'll need an if
statement to check the file existance and rewrite appropriately:
location ~ \.html$ {
if (!-f $request_filename) {
rewrite ^(.*)\.html$ $1.php permanent;
}
}
You'll need an if
statement to check the file existance and rewrite appropriately:
location ~ \.html$ {
if (!-f $request_filename) {
rewrite ^(.*)\.html$ $1.php permanent;
}
}