No need to install any ISAPI filter to remove the index.php from WordPress permalinks.No need of
.htaccess
file..Use these simple steps to WordPress Permalinks in IIS 6.0 using Custom 404 Redirect for Windows Shared hosting/manas hosting or any windows shared hosting.When you run wordpress on IIS server your permalinks have to include the prefix /index.php/ which looks ugly and is totally unnecessary.If you have these requirements as follow:
a.IIS for Windows Shared Hosting
b.WordPress Site
c.Access to change your 404 error page with your web hosting.
This can be remove by following simple steps.
1. Once installed wordpress blog on your site you’ll want to log into the admin section and select options and then select permalinks. Set your permalinks as you wish.
2. Then You’ll create a new text file and name it "404-error.php". In this text file you’re going to include the text:
<?php
// This is the default file for the site. Usually index.php
$default = 'index.php';
// The name of this file.
// Set this value for the URL in Custom Error Properties of your website in IIS.
// Goto: IIS Manager > Websites > [Site Name] > Properties > Custom Errors >
// 404 & 404;2 & 404;3 > URL (Requires a '/' prefix in IIS).
$thisfile = '404-error.php';
$_SERVER['ORIG_PATH_TRANSLATED'] = str_replace($thisfile, $default, $_SERVER['ORIG_PATH_TRANSLATED']);
$_SERVER['SCRIPT_FILENAME'] = str_replace($thisfile, $default, $_SERVER['SCRIPT_FILENAME']);
$_SERVER['ORIG_PATH_INFO'] = str_replace($thisfile, $default, $_SERVER['ORIG_PATH_INFO']);
$_SERVER['SCRIPT_NAME'] = str_replace($thisfile, $default, $_SERVER['SCRIPT_NAME']);
$_SERVER['PHP_SELF'] = str_replace($thisfile, $default, $_SERVER['PHP_SELF']);
$_SERVER['PATH_INFO'] = false;
$qs =& $_SERVER['QUERY_STRING'];
$ru =& $_SERVER['REQUEST_URI'];
$pos = strrpos($qs, '://');
$pos = strpos($qs, '/', $pos + 4);
$_SERVER['URL'] = $ru = substr($qs, $pos);
$qs = trim(stristr($ru, '?'), '?');
// Required for WordPress 2.8+
$_SERVER['HTTP_X_ORIGINAL_URL'] = $ru;
// Fix GET vars
foreach ( $_GET as $var => $val ) {
if ( substr($var, 0, 3) == '404') {
if ( strstr($var, '?') ) {
$newvar = substr($var, strpos($var, '?') + 1);
$_GET[$newvar] = $val;
}
unset($_GET[$var]);
}
break;
}
include($default);
?>
then Upload 404-error.php into the root directory of your blog.
3.Set a custom 404 redirect to “/404-error.php”. It is important that the type of redirect is set to URL.
You can change this directly from within IIS by selecting Properties -> Custom Errors. Select 404. Edit. Set Message Type to URL (you have the option of File, URL or Default). Set it to /404-error.php.
Google Search Keywords:Remove index.php wordpress, remove index.php on shared hosting,php url host,godaddy wordpress install,installing wordpress godaddy,wordpress install godaddy,wordpress custom urls,installing wordpress on iis,godaddy iis,wordpress custom url,url rewrite in wordpress
htaccess url,,wordpress rewrite url,htaccess rewriting,wordpress isapi rewrite,change wordpress url,windows iis,wordpress url rewrite,wordpress url rewriting,iis rewrite rule,isapi rewrite wordpress
I am running Manashosting services, it show index.php in the url http://assuredreturnproperties.com/index.php/gurgaon/
ReplyDeleteI dint got 3rd Step, where i can IIS
@GrowingBricks
ReplyDeletego to the webspace tab in control panel, then click on WebSite Configuration. it will display some tab in right side, click on Error Documents. then click on 404 in list it will display the following windows.
How's your webmaster tools with this solution? How's the 404 error pages? Do they work?
ReplyDelete@Rod Ferris
ReplyDeleteyes of-course this work pls check this site
www.dotnetspider.in
a wordpress site on windows shared hosting.
Thanks a lot Brother......
ReplyDeleteI solve it
http://assuredreturnproperties.com/gurgaon/
God Bless you
Finding Jobs In Agra go to http://jobsinagra.wordpress.com/
ReplyDeleteAnd Get Information About Agra www.agraportal.com
Is there a way to do this with Mac? I don't use IIS. Thanks.
ReplyDeleteThanks this worked but now the home page returns error 404 instead of the selected page in settings/reading
ReplyDeleteHey, I worked this out, but I am getting a message "the data is invalid" So, I know the custom 404 error is getting redirected, but something else is not right.
ReplyDeleteJust wondering if this approach has any implications on SEO ?
ReplyDeleteGreat work www.mintywebs.com thanks!
ReplyDeleteWorked like a charm!
ReplyDeleteYes! Finally ѕomeone writes about seoo hаrvard.
ReplyDeleteAlso νisit my websitе ... seo's
There's a flaw with this - your wegbserver will now response to every duff request (domain.com/reallyRubbishUrl/) with a 200, not 404, status code.
ReplyDeleteDoes anyone have a cure of that please?
I wasted more than 6-8 hours trying to find a solution and yours is the only solution which is easiest to implement and has worked well for me except this home page issue. Can you please help resolve this issue for me. I have lost patience to do any further research or try any other solutions.
ReplyDeletePlease help at the earliest.
have you follow third step.
ReplyDeleteThis article is brimming with information about wordpress maintenance for more like this. I have additionally discovered an article anybody can check for more data WordPress Maintenance , It was knowingly more instructive. You may discover more insights regarding it here.
ReplyDelete