• Resolved vijayforvictory

    (@vijayforvictory)


    Hi,

    I am new to wordpress. My page is running on IIS 6 and PHP 5. provided by https://www.ixwebhosting.com.

    I want to have a pretty permalink as follows /%year%/%monthnum%/%postname%/

    I don’t want the index.php in my page. So I skipped the .ini config method which gave me /index.php/%year%/%monthnum%/%postname%/

    I tried the 404 redirection method. I set my error page as follows.
    https://www.mydomain.com/wp-404-handler.php. This 404 php has the follwing content

    <?php
    $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’);
    ?>

    Still I am not able to get the pretty permalink. I am still getting the page can not be found error for all my posts.

    Can anyone help me to solve this on IIS?

    Thanks and Regards,
    Vijay

Viewing 8 replies - 1 through 8 (of 8 total)
  • seriously, everyone with “professional” windows hosting should lobby their host to install ISAPI Rewrite.

    There just doesn’t seem a shitload of point in providing windows hosting with PHP and MySQL support, but leaving out rewriting, which is a much-requested core feature of the ‘LAMP’ platform.

    Tell your host they’re being stupid. Either run windows for the .NET without php and mysql (using MSSQL instead), or run it *properly* with the extremely minor addition of an ISAPI rewriting module.

    Thread Starter vijayforvictory

    (@vijayforvictory)

    Hi,

    I got the pretty permalink /%year%/%monthnum%/%postname%/ after setting the 404 error page correctly with the content given in my previous post.

    Thanks and Regards,
    Vijay

    hey mate

    i just found your post.

    i’m on ixwebhosting too … i’ve tried this and i’m not getting results.

    i have the 404 page in place, but i don’t know whether i’m directing to the 404 page properly.

    if the 404 is in the wordpress root directory, do i need to put anything in front of it? or https://www.mydomain.com/wp-404-handler.php ??

    i’m not 100% on how to make the “Relative Path to Custom Error page”

    oh, one more question, did you do this before the 2.6 upgrade?? cause that’s when my permalinks broke.

    thanks for the help.

    never mind folks,

    thanks to the infamous otto42, i figured out the easy hack that will get me through until 2.6.1 comes out.

    add /%category%/%tag%/ to your permalinks. like this:

    /index.php/%category%/%tag%/%year%/%monthnum%/%postname%/

    and you’ll be just fine! ??

    Hello Vijay,
    I have the same hosting company and I am in the same situation that you were (new to wordpress, etc). I have created the wp-404-handler.php and I am stuck at that step.

    You said:
    setting the 404 error page correctly with the content given in my previous post.

    Vijay where do you I set that??
    Do you think you could do a quick recap on how you resolved your problem? I am not sure if finally you used the wp-404-handler.php …

    I am pretty sure where are many looking for the solution.
    Thanks a lot in advance !!!
    Nancy

    P.S. Sorry SuperDave your solution did not work for me.

    @superdave – The solution provided by Otto42 overcomes the bad code released in WP2.6 which breaks your custom permalinks, this will be fixed in 2.6.1. You can use the temporary solution provided in your post.

    However, it has nothing to do what Vijay (OP) is looking for, I would like to do the same thing and get rid of the “index.php” from my permalinks. Just about everybody who is running WP on windows has the same wish. But to no avail. I have tried many different methods including but not limited to what is already mentioned here. I have yet to find a solution that works.

    Hello,

    I found this thread while doing a search in the forums for: “index.php iis isapi”.

    I just started a site called ifweran.com which runs a wordpress blog and would like to have “pretty permalinks” without the index.php file. The site is hosted by Gearhost. I have the latest version of WordPress (2.6.1) which I downloaded today.

    I had asked Gearhost a few weeks back if I had IIS hosting and there was, but they said they could do the the ISAPI rewrite for me (here’s the public discussion on this over on the Gearhost support forums: https://community.gearhost.com/forums/t/41.aspx.) When I requested it via the Support ticket, they said it was on, and gave me this for reference:
    https://www.isapirewrite.com/docs/

    So today after I finally got around to installing wordpress for my domain, I went into my Site Admin and into the customize permalink structure page and I took out index.php and put in the following:
    /%year%/%monthnum%/%day%/%postname%/

    However, looking at the main page of my site:
    https://ifweran.com/, you can see the link address that’s showing for the sample post is :
    https://ifweran.com/2008/09/06/hello-world/

    Which doesn’t work when you click on it. This page does still work though which has the index.php in it:
    https://ifweran.com/index.php/2008/09/06/hello-world/

    Is there a chance the ISAPI wasn’t done properly, or am I not doing the SITE ADMIN configurations right?

    Send parameters from wordpress:

    <?php
    $qs = $_SERVER[‘QUERY_STRING’];
    $_SERVER[‘REQUEST_URI’] = substr($qs, strpos($qs, ‘:80’)+3);
    $_SERVER[‘PATH_INFO’] = $_SERVER[‘REQUEST_URI’];

    $_query_get = explode(‘?’, $qs);
    $_query_parametos = explode(‘&’, $_query_get[count($_query_get)-1]);

    for($_parametros = 0 ; $_parametros < count($_query_parametos) ; $_parametros++){
    $_query_keys = explode(‘=’, $_query_parametos[$_parametros]);
    $_GET[$_query_keys[0]] = $_query_keys[1];
    }

    include(‘index.php’);
    ?>

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Pretty Permalink on IIS’ is closed to new replies.