Configure wordpress permalinks in webhost4life windows hosting
If you are hosting your wordpress blog site on webhost4life windows hosting package you may encounter some problem when you configure permalinks for your wodpress site.
Basically, wordpress permalink works with webhost4life servers’ default settings, provided that the /index.php/ is in the Permalink structure.
If you would like more customizations on Permalinks on Windows environment, please follow the below steps:
1.Create a page named wp-404.php and place it in within the WordPress installation root folderThe content of wp-404.php is shown below:
=======================================
<?
$qs = $_SERVER['QUERY_STRING'];
$pos = strrpos($qs, ‘://’);
$pos = strpos($qs, ‘/’, $pos + 4);
$_SERVER['REQUEST_URI'] = substr($qs, $pos);
$_SERVER['PATH_INFO'] = $_SERVER['REQUEST_URI'];
include(‘index.php’);
?>
=======================================
2.Set the 404 custom error page for the wordpress site to point to wp-404.php via hosting control panel->site admin->set custom error
3.Set your own custom Permalinks structure in the WordPress admin section
P.S. By applying this method, the WordPress site cannot setup another custom error pages for 404 status code, so it is suggested to have WordPress installed on a domain/sudomain. Install on a subfolder/virtual directory may not work.