IIS 7 URL Rewrite Module support in WordPress 2.8

I am pleased to let everyone know that WordPress development community has added a built-in support for IIS 7 URL Rewrite Module in the upcoming WordPress 2.8 release. Starting with version 2.8 the Permalink Settings page will allow you to easily configure “Pretty Permalinks” URL structure when WordPress is running on IIS 7 with URL Rewrite Module v1.1 installed.

Here is how the process of updating Permalinks structure will look like in WordPress 2.8 on IIS 7:

  1. Go to Settings –> Permalinks page and choose the permalink structure that you prefer:
    Permalink Settings page with Pretty Permalinks
  2. After clicking on “Save Changes” button the generated rewrite rule will be displayed with the instructions on how to update the web.config file manually:
    Permalink Settings Page with rewrite rule example
  3. Now you can copy the the given XML and put it into the web.config file inside of /<configuration>/<system.webServer>/<rewrite>/<rules> element and that’s it!
  4. Alternatively – instead of manually editing the web.config file you can have WordPress to update it automatically for you. To do that, temporarily grant WordPress write access to web.config file and click on “Save Changes” again. WordPress will add its rewrite rule into the proper location inside of the web.config file. Do not forget to revert the write permission on web.config file after the rule has been saved.

If you want to try this functionality, as well as all the other new features in the upcoming WordPress 2.8 release, you can download the latest nightly build. Also, pretty soon the 2.8 beta will be available.

Thanks to the WordPress development community for adding this functionality! Specifically, big thanks to peaceablewhale, Denis-de-Bernardy, hakre, sivel and ryan for directly working on the patch and contributing to it in many different ways: testing, code reviewing, cleaning up the code and checking it in.

21,906 views

ruslany on May 15th 2009 in PHP, URLRewrite, WordPress

PoorFairAverageGoodExcellent (2 votes, average: 5.00 out of 5)

62 Responses to “IIS 7 URL Rewrite Module support in WordPress 2.8”

  1. Gravatar Imagedeepure responded on 22 May 2009 at 10:14 am #

    Hi, I need to add this rules for wordpress,RewriteRule /tag/(.*) /index\.php\?tag=$1,but it’s used on helicontech’s software.I tried import in iis7 rewrite-module but it does’t work! Can you help me change the rule to iis7? Thanks a lot!

  2. Gravatar Imageruslany responded on 22 May 2009 at 6:05 pm #

    you will need to remove the slash at the beginning of the pattern. Also the substution url in your rule looks incorrect. Try this:

    <rule name=”somerule”>
    <match url=”tag/(.*)” />
    <action type=”Rewrite” url=”index.php?tag=$1″ />
    </rule>

  3. Gravatar ImageSayuri responded on 28 May 2009 at 2:21 pm #

    Hello, we hav install WordPress 2.8 beta2 on IIS 7 with URL Rewrite Module v1.1, but we have no Code under the “Save Changes” button. We have write the code from your screen in the web.config but also a 500 Mistake. Sry my eglish issent good.

  4. Gravatar Imageruslany responded on 29 May 2009 at 12:33 am #

    Sayuri, is IIS configured to run PHP via FastCGI? The WordPress will offer the pretty permalinks option only if PHP is running via FastCGI.

    Also, when WordPress shows the permalink options, do they contain “index.php”?

  5. Gravatar ImageAndrea responded on 29 May 2009 at 8:25 am #

    Hi-
    We are working on permalinks – and I have same issue as Sayuri. How do we check to see if PHP is running on FastCGI. I think it is but not sure how to confirm.

    Thanks you for posting this information about WP and IIS7!

  6. Gravatar Imageruslany responded on 29 May 2009 at 9:05 am #

    Andrea,

    There are three conditions that need to be true in order for WordPress 2.8 to offer pretty permalinks on IIS7:

    1. PHP is running via FastCGI
    2. PHP version 5 is used
    3. URL Rewrite Module 1.1 is installed and enabled.

    If any of those is not true then WordPress will work as in previous versions and will offer “Almost Pretty Permalinks” option.

    To check if FastCGI is used, call phpinfo() function and check the “Server API”. It should say “CGI/FastCGI”. Alternatively, call php_sapi_name() function. It should return ‘cgi-fcgi’.

    Please let me know if you see all three conditions to be true and permalinks still do not work. I will investigate further.

  7. Gravatar ImageAndrea responded on 29 May 2009 at 11:36 am #

    Thanks for the extra info – we manually edited the cgi.config file and made it match what shows in your step #2 above.

    it’s working now. Thank you.

  8. Gravatar Imageruslany responded on 29 May 2009 at 3:23 pm #

    Andrea, did WordPress show you the rewrite rule with the instructions text as shown in screenshot for step #2?

  9. Gravatar ImageMicrosoft Contributing to PHP Open Source Projects – Weird ? : Misfit Geek responded on 02 Jun 2009 at 7:13 am #

  10. Gravatar ImageCelso responded on 18 Jun 2009 at 9:00 pm #

    I am getting a fraking error on every page, every update of every field on the site since I upgraded to 2.8 iis. It is making me consider downgrading wordpress. I would appreciate any light on this issue:

    PHP Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(C:\SITES\HypeScience.com\www/C:\SITES\HypeScience.com\www/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-en_US.mo) is not within the allowed path(s): (C:\SITES) in C:\SITES\HypeScience.com\www\wp-includes\l10n.php on line 324

  11. Gravatar Imageruslany responded on 18 Jun 2009 at 11:15 pm #

    Celso, thanks for reporting this. Looks like this is a bug in the plugin. It incorreclty passes an argument to a function load_plugin_textdomain, which causes the open_basedir warning.

    You can work around it by changing the init function in all_in_one_seo_pack.php file to look like this:

    function init() {
    if (function_exists('load_plugin_textdomain'))
    load_plugin_textdomain('all_in_one_seo_pack', false, 'all-in-one-seo-pack');
    }

    Note that after you change this you may run into another bug that only shows up with open_basedir enabled – http://core.trac.wordpress.org/ticket/10132. That one will be fixed in 2.8.1.

  12. Gravatar ImageCelso responded on 19 Jun 2009 at 12:24 pm #

    Thanks man. I rolled back the plugin and things got better. But i am getting the open_basedir enabled. Will wait until the next until 281.

  13. Gravatar Imageruslany responded on 19 Jun 2009 at 1:15 pm #

    The all-in-one-seo-pack plugin author has been informed of this bug and will look into fixing it in next plugin update.

  14. Gravatar ImagePhilip M. Hofer (Frumph) responded on 14 Jul 2009 at 10:35 pm #

    Unfortunately the 2.8.1 release of wordpress only allows a single rule to be manipulated into the web.config and not multiple rules as such is needed for WPMU and future rules as needed.

    Hopefully an update that loops through listed rulesets will fix this in a future patch.

    - Phil

  15. Gravatar Imageruslany responded on 20 Jul 2009 at 11:04 am #

    The patch for WPMU 2.8 has been provided and it should be fixed in future releases of WPMU.

  16. Gravatar ImageVijay Bandari responded on 06 Aug 2009 at 9:40 am #

    hi…
    recently i setup wordpress 2.8 with on IIS 7 with fastCGI and Rewrite Module is installed.
    I am not seeing any code section as in screeshot #2, i want to have a url with out index.php so i setup custom structure to “/%year%/%monthnum%/%day%/%postname%/” but the links are not working.

    Can you please guide me in fixing this issue.

  17. Gravatar Imageruslany responded on 06 Aug 2009 at 9:54 am #

    Vijay, please check the conditions described in this comment and let me know what you find.

  18. Gravatar ImageDavid Potter responded on 13 Nov 2009 at 6:56 pm #

    Great module – thanks so much! 2 questions.

    1. Your rewrite rule is different than the one created by WordPress. Is there a difference in performance or behavior between the two?

    2. I’d like to have anyone who navigates using index.php receive a permanent redirect to the URL without the index.php. Is there a way to do that?

    Here are my versions:
    - Windows Server 2008 R2
    - URL Rewrite Module v2.0 RC
    - PHP 5.3.0
    - WordPress 2.8.5

    Thanks,
    David

  19. Gravatar Imageruslany responded on 15 Nov 2009 at 3:33 pm #

    @David:

    1. No, there is no difference in performance. URL rewrite module caches the rewrite rules logic, so it does not matter if wildcard or regex is used for the rule. The wordpress rule uses wildcard patterns, because it is simpler.

    2. It is relatively easy to do. Just create a redirect rule that has pattern “^index\.php” and then redirects to “/”. Place this rule before the rewrite rule generated by the wordpress.

  20. Gravatar ImageSunil Jain responded on 18 Jan 2010 at 10:16 am #

    Hello Ruslany , i am in deep trouble . pls help me
    I am getting this error on my blog’s homepage header and also i am unable to login to my admin panel

    Below are the errors i am getting in my blog
    1. On the Header :
    “Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/customers/gupshupblog.com/gupshupblog.com/httpd.www/wp-content/plugins/index.php/languages/index-en_US.mo) is not within the allowed path(s): (/customers/gupshupblog.com/gupshupblog.com:/tmp:/var/www/diagnostics:/usr/share/php) in /customers/gupshupblog.com/gupshupblog.com/httpd.www/wp-includes/l10n.php on line 329″

    And this error i recive when i try to login to my admin panel
    Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/customers/gupshupblog.com/gupshupblog.com/httpd.www/wp-content/plugins/index.php/languages/index-en_US.mo) is not within the allowed path(s): (/customers/gupshupblog.com/gupshupblog.com:/tmp:/var/www/diagnostics:/usr/share/php) in /customers/gupshupblog.com/gupshupblog.com/httpd.www/wp-includes/l10n.php on line 329

    Warning: Cannot modify header information – headers already sent by (output started at /customers/gupshupblog.com/gupshupblog.com/httpd.www/wp-includes/l10n.php:329) in /customers/gupshupblog.com/gupshupblog.com/httpd.www/wp-includes/functions.php on line 790

    Warning: Cannot modify header information – headers already sent by (output started at /customers/gupshupblog.com/gupshupblog.com/httpd.www/wp-includes/l10n.php:329) in /customers/gupshupblog.com/gupshupblog.com/httpd.www/wp-includes/functions.php on line 791

    So pls help me out in resolving this ??? :( :( :(

  21. Gravatar Imageruslany responded on 18 Jan 2010 at 10:26 am #

    Sunil, can you open the php.ini file used by your PHP installation and check what is the value specified for the open_basedir directive? I suspect that it may have been specified incorrectly. The paths should be separated by “;”, but in your case it looks like they are separated by “:”.

  22. Gravatar ImageJohn responded on 02 Feb 2010 at 10:16 pm #

    I am getting a 404 error on all my posts after implementing this change. Do you know why that might be? I meet all the requirements

    php 5.2.9
    iis 7
    url rewrite 2.0

    I set the proper permissions and let WP modify my web.config the rule got created ok and everything works on the site EXCEPT for posts.

  23. Gravatar Imagea43 responded on 08 Feb 2010 at 12:58 pm #

    Hi Ruslan,

    I am trying to redirect all of my blogengine like urls to my wordpress blog but struggling to accomplish this task. Please help!

    blogengine url format: http://www.mydomain.com/post/2010/02/07/this-is-the-post-title.aspx

    wordpress url: http://www.mydomain.com/2010/02/07/this-is-the-post-title/

    I’ve added a new rule along with the wordpress rule for some reason i am getting the old 404 error when I try the blogengine url format.

    The site is hosted on ISS7 and PHP5 (godaddy windows shared hosting)

    please have a look at my web.config and let me know if i am doing anything wrong:

    <configuration>
    <system.webServer>
    <rewrite>

    <rules>
    <rule name="Redirect(301) all legacy BlogEngine posts">
    <match url="(/20[0-9][0-9]/\d{2}/\d{2}/)(.*).aspx" />
    <action type="Rewrite" url="{R:0}{R:1}/" />
    </rule>

    <rule name="wordpress" patternSyntax="Wildcard">
    <match url="*" />
    <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.php" />
    </rule>
    </rules>
    </rewrite>
    </system.webServer>
    </configuration>

    Please Note: the wordpress rewrite works fine.

  24. Gravatar Imageruslany responded on 09 Feb 2010 at 5:29 pm #

    @a43: This is most probably because the pattern for the redirect rule is incorrect. Try this rule instead:

    <rules>
    <rule name="Redirect(301) all legacy BlogEngine posts">
    <match url="^post/(20[0-9][0-9]/\d{2}/\d{2}/)(.*).aspx" />
    <action type="Rewrite" url="{R:1}{R:2}/" />
    </rule>

  25. Gravatar Imagea43 responded on 10 Feb 2010 at 10:28 am #

    Ruslan, thanks for the reply.

    I did try your rule unfortunately it didn’t work, still getting the 404 error.

    after loads of googling and “trail and error” managed to get the following rule to work on my environment:

    <rule name="Redirect(301) all legacy BlogEngine posts" stopProcessing="true">
    <match url=".aspx" />
    <conditions>
    <add input="{HTTP_URL}" negate="false" pattern="(/20[0-9][0-9]/\d{2}/\d{2}/)(.*)\.aspx" />
    </conditions>
    <action type="Redirect" url="{C:1}{C:2}/" redirectType="Permanent" />
    </rule>

    can you see any differences? I still can’t understand why your suggested rule didn’t work.

  26. Gravatar Imageruslany responded on 10 Feb 2010 at 12:42 pm #

    My rule did not work because its pattern starts with ^post. It looks like your URLs do not actually start with /post, so if you modify the rule pattern to be “(20[0-9][0-9]/\d{2}/\d{2}/)(.*).aspx$” then it should work. Note that it is important to not have the “/” at the beginning of the pattern.

  27. Gravatar Imagea43 responded on 11 Feb 2010 at 12:34 pm #

    Thanks Ruslan

  28. Gravatar ImageShir responded on 28 Feb 2010 at 7:57 am #

    Hi,

    I have tried to apply it on my site, which runs on IIS 7, unfortunately it seems to be working only when the page slug is written in english.
    When I try to click on a page where the slug is in hebrew letters such as פרופיל (Profile) it goes to my custom 404 page.

    Is there any solution for this? Thank you.

  29. Gravatar Imageruslany responded on 02 Mar 2010 at 11:46 am #

    @Shir: there is a known issue in IIS 7 FastCGI module in how it handles the REQUEST_URI server variable for non-ascii characters. IIS team is planning to provide an update for it soon.

    Meanwhile you can use this workaround:

    In the wp-config.php file add this code:

    if (isset($_SERVER['UNENCODED_URL']))
    $_SERVER['REQUEST_URI'] = $_SERVER['UNENCODED_URL'];

  30. Gravatar ImageShir responded on 14 Mar 2010 at 11:09 am #

    Hi, Thank you for your reply… but it doesn’t seems to work …
    Thanks, I guess we will just have to wait for it to be solved.

  31. Gravatar Imagecs responded on 25 Mar 2010 at 11:55 am #

    my wordpress is installed in a subfolder (blog.domain.com)

    how do we know that URL Rewrite Module 1.1 is installed and enabled?

    i try to add the rewrite code in the web.config but i receive error 500.. may i know how to solve?

  32. Gravatar Imageruslany responded on 25 Mar 2010 at 2:09 pm #

    If you try to add the rewrite rule and get error 500 then most probably the url rewrite module is not installed. You can check if it is installed and enabled by using this code in PHP script:

    < ?php
    if (isset($_SERVER['IIS_UrlRewriteModule']))
    echo 'URL Rewrite Module is installed';
    else
    echo 'URL Rewrite Module is not installed';
    ?>

  33. Gravatar Imagegeert responded on 01 Jun 2010 at 7:42 am #

    I have installed a Windows 2008 Server R2 and I have installed WordPress via the “Web App Gallery”.

    When trying to change the permalinks settings in the WP admin panel, I see the XML code I should enter in the web.config file.

    The web.config in the root of the webserver only contains the values that WP suggested.

    When I go to a individual post on the WP website, I get an IIS7 404 error page …

    How can I check what version of URL rewrite and all the other things (PHP? FastCGI?) I have installed?

  34. Gravatar ImageArif responded on 19 Jul 2010 at 10:07 pm #

    Hello ruslany please help me i have wordpress 3.0 with iis7 my url rewriting not working . all url come with /index.php/ . how to remove this . and also 404 not working plese help me?

    Is there any solution for this? Thank you.

  35. Gravatar Imageruslany responded on 20 Jul 2010 at 5:15 pm #

    Hi Arif, How did you install WordPress and which URL rewrite module do you use?

  36. Gravatar ImageArif responded on 28 Jul 2010 at 2:25 am #

    Hello Sir,

    Thanx for you support , i have normally uploaded and installed WordPress 3.0 and actually i have iis6 . and my host provider said me that he don’t know about URL rewrite module . So please tell me is there any solution which is done by my side only . Thanx ones again .

  37. Gravatar Imageruslany responded on 30 Jul 2010 at 10:18 am #

    Hi Arif,

    The URL Rewrite Module is not supported for IIS 6. You may want to ask your hosting provider if they would consider installing a third party URL Rewriting solutions on their servers, e.g. ISAPI_Rewrite.

  38. Gravatar ImageArif responded on 02 Aug 2010 at 11:10 pm #

    Thank you Sir

  39. Gravatar ImageDivyesh responded on 08 Aug 2010 at 2:10 pm #

    Hi,

    I install my blog at

    http://blog.mydomain.com

    which is redirected at http://www.mydomain.com/blog/

    the syastem configuration is as below.

    Control panel : plesk 9.7.2
    IIS : 7
    Php : 5.2.13 (Fast CGI Application)
    ASP.NET support : Version 2.0.50727.0

    wordpress : 3.1

    my permalink is default. i try so many things but it’s not change perfectly.

    i write .htaccess
    like,

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f # Existing File
    RewriteCond %{REQUEST_FILENAME} !-d # Existing Directory
    RewriteRule . /index.php [L]

    # END WordPress

    what should i have to do..

    plz help me out from this problem.

    i want to use permalink like
    http://www.mydomain.com/blog/archives/postname
    http://www.mydomain.com/blog/Categories/Categories_name
    http://www.mydomain.com/blog/tags/tags_name

    can u plz provide me full code for mod rewrite at my mail id.

    or any other solutions for this problem.

  40. Gravatar ImageAdam responded on 27 Aug 2010 at 8:57 am #

    ruslany,

    My web hoster has the URL Rewrite module installed, and the pretty permalinks are working fine. However, navigating to the home page results in a 404. So, http://blogs.adambarney.com/tech/ is getting the 404. Disabling pretty permalinks will cause this error to go away.

    Any ideas?

  41. Gravatar Imageruslany responded on 27 Aug 2010 at 1:34 pm #

    Adam, the 404 message that you are getting – is it a WordPress page saying that page is not found or is it a standard IIS 404 message?

  42. Gravatar ImageKBK responded on 03 Sep 2010 at 3:35 pm #

    Hey there,

    My server has PHP 5.2.13 installed, and it is running via the FastCGI module. Also, the URL Rewrite module is enabled as well, and its version number looks to be 7.1.0761.0.

    Media uploaded media uploads fine – no errors, photos make thumbnails & 2 other sizes fine – can see all of these files when I ftp in, can pull media down via ftp and view it… but the url path to the original media file (unresized) returns 500 error when used in a page – or even just in a browser. Here’s an original jpg for instance:

    http://www.beyondthepasta.com/wp-content/uploads/Rome-from-the-Pincian-Hill.jpg

    Resized versions show up fine: http://www.beyondthepasta.com/wp-content/uploads/Rome-from-the-Pincian-Hill-300×242.jpg

    but not the original file – which is definitely there.

    Here is my web.config:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    <system.webServer>
    <!– <httpErrors existingResponse="Replace" errorMode="Detailed" />–>
    <defaultDocument>
    <files>
    <remove value="index.php" />
    <add value="index.php" />
    </files>
    </defaultDocument>

    <rewrite><rules><clear />
    <rule name="wordpress" patternSyntax="Wildcard">
    <match url="*" />
    <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.php" />
    </rule>

    </rules></rewrite>

    </system.webServer>
    </configuration>

    Thank you for any assistance :) I will be bald soon if I don’t figure this out!

  43. Gravatar Imageruslany responded on 03 Sep 2010 at 6:15 pm #

    Hi KBK, what does the detailed IIS error say? You can temporary enable detailed errors, repro the problem and then disable them back.

  44. Gravatar ImageBrian Kupper responded on 21 Oct 2010 at 10:48 am #

    Hi, how are you Ruslany! i have installed the last version of wordpress but i dont see the web.config. So i have to create it my self or i have to contact my hosting services to create it? Im using IIS 7.5

    Thanks!

  45. Gravatar Imageruslany responded on 22 Oct 2010 at 11:21 pm #

    Hi Brian, you can create the web.config yourself and then add there the rewrite rule. You can copy the rewrite rule from the Settings -> Permalinks page in WordPress.

  46. Gravatar ImageMuqeet responded on 06 Dec 2010 at 11:03 am #

    How I create web.config, there is any hints for it

  47. Gravatar Imageruslany responded on 08 Dec 2010 at 11:51 pm #

    Hi Muqeet,

    Create an emply text file called web.config and paste there the xml that wordpress gives you. Then save/upload this file to your wordpress site’s root directory.

  48. Gravatar ImageClimatiseur responded on 20 May 2011 at 8:23 pm #

    Hi Ruslany, sorry to bring this post up :0) I’m used to 1-click install of wp and now, I have to move my site (WP 3.1.2) to my own server (IIS). The people who are migrating my website, are telling me that the cannot migrate it, because, on IIS, .htacces URL rewriting is not supported. I have read your post and was wondering if I install wordpress, mysql, that I install/activate URL rewriting module and FASTCGI, is there anything that can go wrong?

    Thank you in advance!

  49. Gravatar Imageruslany responded on 20 May 2011 at 8:35 pm #

    Hi Climatiseur, if you have IIS 7.+ then it support URL rewriting and you can follow the instructions in this post to configure wordpress to use it. I would suggest to install PHP on your server by using web platform installer. That way there is very little change that something is misconfigured or goes wrong.

  50. Gravatar ImageArtem responded on 29 Jun 2011 at 4:23 am #

    Hi ruslany!
    Can I use this rewrite rules without installing URL Rewrite Module? – for example, add some modules to my project (such as if RIA service wasn’t installed, i can add few modules to bin directory and it works)
    …or there are one way – ask my hoster to install this?

  51. Gravatar Imageruslany responded on 29 Jun 2011 at 8:46 am #

    Hi Artem, unfortunately it is not possible to just drop dll’s to the bin folder. This is a native module (for performance reasons) and requires registration with IIS. So the only way is to ask hoster to install it. At this point it has been around for a while and has proven to work very well. It also has Windows supplemental license, meaning that it is part of the Windows OS and gets the same support as any other Windows OS component. So I do not see any reason why hoster would still not want to enable it on their environment.

  52. Gravatar ImageOliver responded on 24 Aug 2011 at 9:43 am #

    Hi Ruslany,

    Looking at the date of your last response it looks like you may still be around to answer my question? If so that would be really good.

    Adam asked this question last year

    “ruslany,

    My web hoster has the URL Rewrite module installed, and the pretty permalinks are working fine. However, navigating to the home page results in a 404. So, http://blogs.adambarney.com/tech/ is getting the 404. Disabling pretty permalinks will cause this error to go away.

    Any ideas?”

    I am having the same problem, seems like I have everything working apart from when you go to the root of my wordpress blog it returns 404 error. See here: http://www.cccit.co.uk/news
    But if you go to one of my test posts http://www.cccit.co.uk/news/test-post
    It is working fine. Any ideas? It would be very much appriecated!

    Thank you,

    Oli

  53. Gravatar Imageruslany responded on 25 Aug 2011 at 11:24 pm #

    Hi Oli,

    If I request http://www.cccit.co.uk/news/index.php then it serves the page. It looks to me that the default document setting is not setup. I am not sure which web server you have, but if it is IIS then you need to add index.php to the list of default documents.

  54. Gravatar ImageOliver responded on 26 Aug 2011 at 2:41 am #

    Hello again,

    Sorry to keep posting you can probably partly ignore the above posts. I may have misunderstood what you ment.

    Where can I set the default document type for this site, without it affecting the other sites I have hosted. Do I add a line of code to the web.config file or do I log into the server and go to IIS Manager –> Default Document

    At this stage I’m really not sure what I’m doing, but I don’t want to cause issues to my other sites. Thanks again.

  55. Gravatar ImageOliver responded on 26 Aug 2011 at 3:30 am #

    Ok ignore all past posts… very sorry. I have now found a soloution.

    I have just copied all the code from the example on this page into my web.config file

    http://learn.iis.net/page.aspx/557/translate-htaccess-content-to-iis-webconfig/

    Thanks again for asking the right question to get me thinking.

    Great site by the way!

  56. Gravatar Imageruslany responded on 26 Aug 2011 at 9:48 am #

    Hi Oliver, it’s great that you’ve figured it out. Although I am getting HTTP 500 on your site at the moment :) .

  57. Gravatar ImageMark responded on 03 Oct 2011 at 4:35 am #

    Hey,

    first of all, I searched for all kind of permalinks solutions and this seems to be the only one working, many many many thanks ruslany!!
    However: I’ve the same problem as stated above (Oliver): everything works perfect, except the homepage :( it works when i put index.php behind it. I don’t really understand the solution, explaining it in simple words would be so awesome. Many thanks in advance!!

  58. Gravatar Imageruslany responded on 03 Oct 2011 at 9:11 pm #

    Hi Mark, it looks like the index.php is not added as a default document in iis. Try adding it as described in this post.

  59. Gravatar ImageFranklin Tse responded on 18 Oct 2011 at 11:02 am #

    Hi Ruslany,

    A WordPress Trac ticket was created attempting to fix how IIS FastCGI handles the REQUEST_URI server variable with non-ASCII characters. Is that necessary? Would you mind reviewing the patch?

    https://core.trac.wordpress.org/ticket/18987

    Thanks,
    Franklin

  60. Gravatar Imageruslany responded on 19 Oct 2011 at 3:50 pm #

    Hi Franklin, I do not think it is necessary because as far as I remember the FastCGI update included a fix for this problem.

  61. Gravatar Imagesagar responded on 10 Jan 2012 at 2:36 am #

    Hi ruslany,
    I used following things

    IIS : 7
    Php : 5.2 (Fast CGI Application)
    wordpress : 3.1
    URL Rewrite Module v2.0 RC

    my permalink is default. And i want use the structure base permalink. I install all the require module which you define above. But when i update the permalink like(/%year%/%monthnum%/%postname%/) but it will not suggest the web.config code as you shown. And i tried to put manually in the web.config file but it gives 404 error.
    plz help me what i have to do for this

    or any other solutions for this problem.

  62. Gravatar Imagemichell responded on 10 Jan 2012 at 5:10 am #

    Hi sir,

    I am getting a 404 error whenever i changed the permalink of my site. Do you know why that might be? I meet all the requirements

    php 5.2.13(Fast CGI Application)
    iis 7
    url rewrite 2.0
    wordpress : 3.1

    When i update my permalink it will not suggest any code to me. Even manually i created the web.config file and put the code then it gives the 505 error.
    Is there any solution for this? Thank you.

Trackback URI | Comments RSS

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

XML Markup: If You want to add XML code to the comment please XML encode it first, otherwise the code will not show up.

Recently Published Articles