WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pretty Permalink on IIS (9 posts)

  1. vijayforvictory
    Member
    Posted 6 years ago #

    Hi,

    I am new to wordpress. My page is running on IIS 6 and PHP 5. provided by http://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.
    http://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

  2. Ivovic
    Member
    Posted 6 years ago #

    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.

  3. vijayforvictory
    Member
    Posted 6 years ago #

    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

  4. superdave
    Member
    Posted 5 years ago #

    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 http://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.

  5. superdave
    Member
    Posted 5 years ago #

    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! :)

  6. enigmasolution
    Member
    Posted 5 years ago #

    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.

  7. scharique
    Member
    Posted 5 years ago #

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

  8. srizvi1
    Member
    Posted 5 years ago #

    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: http://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:
    http://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:
    http://ifweran.com/, you can see the link address that's showing for the sample post is :
    http://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:
    http://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?

  9. lco.souza
    Member
    Posted 5 years ago #

    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');
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic