Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am newbie to wordpress. I have created a site using wordpress and WAMP stack. In my Apache i have enabled mode_rewrite , so my site is showing permalinks perfectly.

Now i have hosting provider of .NET and IIS server. So when i migrated my site to live server it is working fine without permalinks. But when i type using raw url like www.example.com/?p=12 it is working fine. So how can i make it work with IIS just like Apached did..

Is there anything in IIS like mode_rewrite in Apache

share|improve this question
    
Checkout the official manual first: codex.wordpress.org/… –  rofflox Jun 7 '13 at 6:35
    
Have you read and tried Read Enabling Pretty Permalinks in WordPress on IIS? –  toscho Jun 7 '13 at 6:55
    
Thanks a lot..Working now... –  mohit_rocks Jun 7 '13 at 7:18
add comment

1 Answer

up vote 0 down vote accepted

Thanks to @rofflox and @toscho for giving me the link. web.config file was not created as i was working on localhost as WAMP i.e Apache and it required when i shifted to production as it was running IIS.

So i created a blank web.config file and added the following content.

<rewrite>
    <rules>
        <rule name="Main Rule" stopProcessing="true">
            <match url=".*" />
            <conditions logicalGrouping="MatchAll">
                <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>

This helped me to accept permalinks perfectly.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.