Skip to main content

remove index.php from wordpress on win2003 shared hosting

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.

1Once 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.

4. That's It done.Check your blog.It will working Fine.

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

Comments

  1. I am running Manashosting services, it show index.php in the url http://assuredreturnproperties.com/index.php/gurgaon/

    I dint got 3rd Step, where i can IIS

    ReplyDelete
  2. @GrowingBricks

    go 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.

    ReplyDelete
  3. How's your webmaster tools with this solution? How's the 404 error pages? Do they work?

    ReplyDelete
  4. @Rod Ferris

    yes of-course this work pls check this site

    www.dotnetspider.in

    a wordpress site on windows shared hosting.

    ReplyDelete
  5. Thanks a lot Brother......
    I solve it
    http://assuredreturnproperties.com/gurgaon/

    God Bless you

    ReplyDelete
  6. Is there a way to do this with Mac? I don't use IIS. Thanks.

    ReplyDelete
  7. Thanks this worked but now the home page returns error 404 instead of the selected page in settings/reading

    ReplyDelete
  8. Hey, 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.

    ReplyDelete
  9. Just wondering if this approach has any implications on SEO ?

    ReplyDelete
  10. Great work www.mintywebs.com thanks!

    ReplyDelete
  11. Worked like a charm!

    ReplyDelete
  12. Yes! Finally ѕomeone writes about seoo hаrvard.



    Also νisit my websitе ... seo's

    ReplyDelete
  13. 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.
    Does anyone have a cure of that please?

    ReplyDelete
  14. 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.

    Please help at the earliest.

    ReplyDelete
  15. This 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

Post a Comment

Popular posts from this blog

UP TET 2011 Exam Application,UPTET 2011 Result | UPTET 2011 Revised Result

UPTET 2011 Result | UPTET 2011 Revised Result | UPTET 2011 Updated Result |Board of High School and Intermediate Education Uttar Pradesh, Allahabad UP TET Advertisement 2011 and Exam Detail/Admit Card/Call Letter Download UP TET 2011 FORM & DETAILS  GET LATEST DETAIL ABOUT 72825 Primary Teacher Merit List UP TET 2011 Application form submission last date is 18-Oct-2011.Forms will be distributed from PNB bank all over UP.According to latest news Appearing B.Ed student also eligible for TET exam 2011 so they can also submit their forms to concern District.There is no requirement for Rojgar Registration No and Bank receipt within the application form.UP TET 2011 exam results will be avail on http://www.uptet2011.com . Now you can easily get Application from from the P.N.B bank Branches. UPTET 2011 Result | UPTET 2011 Revised Result | UPTET 2011 Updated Result |  Board of High School and Intermediate Education Uttar Pradesh, Al...

DataView Rowfilter With Like % in C#.Net

DataView RowFilter Syntax in C#,ASP.Net Example This example describes syntax of DataView.RowFilter expression. It shows how to correctly build expression string (without "SQL injection" ) using methods to escape values. Column names If a column name contains any of these special characters ~ ( ) # \ / = > < + – * % & | ^ ' " [ ], you must enclose the column name within square brackets [ ]. If a column namecontains right bracket ] or backslash \, escape it with backslash (\] or \\). [C#] dataView.RowFilter = "id = 10″; // no special character in column name " id " dataView.RowFilter = "$id = 10″; // no special character in column name " $id " dataView.RowFilter = "[#id] = 10″; // special character " #" in column name "#id" dataView.RowFilter = "[[id\]] = 10″; // special characters in column name " [id] " Literals String values are enclosed within single qu...

UP Primary Teacher Recruitment 2011 – 72825 vacancy filled by jan 2012,Up Basic Education Primary Teacher Result, Up Basic Education Primary Teachers DIET wise Merit List, Primary Teachers Vacancy ,Teachers Vacancy in UP

Uttar Pradesh Government will recruit 72,825 Primary Teachers in schools of Basic Education council. This decision has been approved in the cabinet of UP. There are total 3,86,726 posts of teachers in the state out of which 2,84,391 posts have already been created. Currently only 1,87,155 teachers are working. There are 1,99,571 vacant posts of primary teachers  and the Government is planning to fill up 72,825 posts. Details of eligibility and application process are following: Eligibility : Educational Qualification –  Minimum 50% in Graduation ( BA / B.Sc /B.Com) with B.Ed degree Have to qualify Teacher Eligibility Test ( UP TET) Age  should be 18 to 35 years ( as on 1 st  July,2011  Applicaton fee  – Rs. 500 for General Candidates, Rs. 200 for SC, ST . There is no application fee for PH candidates. Interested candidates who are living in UP for last five years can apply from five districts of their...