Simple rule to rewrite the traffic from index.html to index.php. Useful quick fix for wordpress websites.
If you’re using apache httpd server
You can deploy this rule inside the .htaccess file, the one inside the root folder, or inside the httpd.conf in the proper section
RewriteRule ^index.html$ /index.php [R,L]
More info: https://httpd.apache.org/docs/2.4/rewrite/flags.html
Other webserver
Just create a file called index.html and deploy in the root of your website with the following content
<html>
<head>
<title>Your website</title>
<script>
window.location=`${location.protocol}//${window.location.hostname}/index.php`;
</script>
</head>
<body></body>
</html>
0 Comments