WordPress.org

Support

Support » Multisite » How to Remove index.php from sub domain url in wordpress

How to Remove index.php from sub domain url in wordpress

  • Tejdeep Singh
    Member

    @tejdeep-singh

    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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Tejdeep Singh
    Member

    @tejdeep-singh

    Site is uploaded on IIS

    Do pretty permalinks work on your main site?

    What version of IIS?

    Do you use web.config or .htaccess?

    Tejdeep Singh
    Member

    @tejdeep-singh

    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 !

    Tejdeep Singh
    Member

    @tejdeep-singh

    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>

    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.

    Tejdeep Singh
    Member

    @tejdeep-singh

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

    Tejdeep Singh
    Member

    @tejdeep-singh

    i got the version 🙂
    SERVER_SOFTWARE = Microsoft-IIS/6.0
    6.0

    Tejdeep Singh
    Member

    @tejdeep-singh

    Problem is not solved yet….

    Yeah, I’m sorry, I don’t use IIS and Multisite so I can’t figure this out 🙁

    Tejdeep Singh
    Member

    @tejdeep-singh

    oh ok no wry 🙂

    Tejdeep Singh
    Member

    @tejdeep-singh

    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>

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to Remove index.php from sub domain url in wordpress’ is closed to new replies.