WordPress.org

Ready to get started?Download WordPress

Forums

How to Remove index.php from sub domain url in wordpress (12 posts)

  1. Tejdeep Singh
    Member
    Posted 1 year ago #

    Hello Every One :)
    I am using wordpres for my blog on sub domain (blog).it works well but when i change default permalink to Postname, then index.php shows in url.
    Please tell me how to overcome this problem.

    Thank You

  2. Tejdeep Singh
    Member
    Posted 1 year ago #

    Site is uploaded on IIS

  3. Do pretty permalinks work on your main site?

    What version of IIS?

    Do you use web.config or .htaccess?

  4. Tejdeep Singh
    Member
    Posted 1 year ago #

    Thanks for reply :)
    Actually main site is in html only. wordpress is installed on sub-domain, i used web.config file but it's not working.
    i dont know the version of IIS !

  5. Tejdeep Singh
    Member
    Posted 1 year ago #

    i used this code in web.config file but it's not working....

    <?xml version="1.0" encoding="UTF-8"?>
        <configuration>
        <system.webServer>
         <defaultDocument>
             <!-- Set the default document -->
              <files>
                <remove value="index.php" />
                <add value="index.php" />
              </files>
            </defaultDocument>
                <httpErrors errorMode="Detailed"/>
            <rewrite>
                <rules>
                    <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>
  6. The answers depend on what version of IIS, and if you have certain rewrite scripts added.

    If you get the same problem on your main site (that is if you had it BEFORE you activated Multisite, and you should have tested that first), then ask your host how to do it.

  7. Tejdeep Singh
    Member
    Posted 1 year ago #

    ok i will tell you versrion of IIS soon :)
    main site works properly.
    see you soon.
    thanks

  8. Tejdeep Singh
    Member
    Posted 1 year ago #

    i got the version :)
    SERVER_SOFTWARE = Microsoft-IIS/6.0
    6.0

  9. Tejdeep Singh
    Member
    Posted 1 year ago #

    Problem is not solved yet....

  10. Yeah, I'm sorry, I don't use IIS and Multisite so I can't figure this out :(

  11. Tejdeep Singh
    Member
    Posted 1 year ago #

    oh ok no wry :)

  12. Tejdeep Singh
    Member
    Posted 1 year ago #

    This Code Works good For IIS 7 version..

    <?xml version="1.0" encoding="UTF-8"?>
        <configuration>
        <system.webServer>
         <defaultDocument>
             <!-- Set the default document -->
              <files>
                <remove value="index.php" />
                <add value="index.php" />
              </files>
            </defaultDocument>
                <httpErrors errorMode="Detailed"/>
            <rewrite>
                <rules>
                    <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>

Topic Closed

This topic has been closed to new replies.