Page 1 of 1

Wordpress WP.net Visual Studio localhost wont run index.php

PostPosted: December 13th, 2012, 2:58 pm
by Madde
Hi

I have downloaded and setup WordPress.
It was all fine until i was done to test it.
Visual Studio localhost wont run the index file.
It's just the: Directory Listing -- /wpdotnet/ page.
It's possible to run the wpdotnet/wp-admin/index.php but not the wpdotnet/index.php file. It just throw me back to Directory Listing page.
Please Help

Re: Wordpress WP.net Visual Studio localhost wont run index.

PostPosted: December 13th, 2012, 3:37 pm
by Jakub Misek
Hi,

WordPress checks the URL and redirects you automatically to root dir in case of index.php file.

You have to add defaultDocument configuration.

Add following into your web.config, into <configuration><system.webServer>
Code: Select all
<defaultDocument>
    <files>
        <add value="index.php" />
    </files>
</defaultDocument>

Re: Wordpress WP.net Visual Studio localhost wont run index.

PostPosted: December 14th, 2012, 7:29 am
by Madde
Thanks!

Makes all sense but

this is already in there:

Code: Select all
    <defaultDocument>
      <files>
        <remove value="index.php"/>
        <add value="index.php"/>
      </files>
    </defaultDocument>

Re: Wordpress WP.net Visual Studio localhost wont run index.

PostPosted: December 14th, 2012, 4:04 pm
by Jakub Misek
It is :? but IIS is still not handling index.php as a default document.

What is your web server ? IIS, IIS Express, Apache ? It would be related to specific version of your server.

Re: Wordpress WP.net Visual Studio localhost wont run index.

PostPosted: December 17th, 2012, 8:02 am
by Madde
It's Visual Studio Developer Server.
It's working on the usual IIS.

Just visual Studio that's the problem.

But it's Ok i use the usual iis instead.

Re: Wordpress WP.net Visual Studio localhost wont run index.

PostPosted: December 17th, 2012, 6:42 pm
by Jakub Misek
I don't know how to set default document on VS dev server ... there should be a way ...

Re: Wordpress WP.net Visual Studio localhost wont run index.

PostPosted: December 20th, 2012, 12:12 pm
by Madde
Yes you just right click on the file and click set default document but it's not an option on php files. but the Web.config trick should do it but i don't know why it doesn't work.