Moving an Application for php to iis windows serverRSS

3 replies

Last post Nov 06, 2008 02:48 PM by simerjots

  • Moving an Application for php to iis windows server

    Nov 04, 2008 11:06 AM|ekam27|LINK

    Hey guys,

     

    I moved a php application to  windows iis, i tink this application orginally belonged on a linux server.

    Anyway the application is working fine expect  that root directory has 4 folder (admin,cgi,www)

    the www folder has all the website files.

     

    I have to put http://mydomain.com/www/ to load the website.

    How can I fix this so when I go to http://mydomain.com it is the www folder and also i want to be able to access http://mydomain.com/admin

     

    Thanks

     

  • Re: Moving an Application for php to iis windows server

    Nov 04, 2008 12:24 PM|ruslany|LINK

    You could use URL rewrite module to do that. In the web.config file at the root directory add these rewrite rules:

    <rewrite>
       <rules>
         <!-- This rule will prevent rewriting if request is made to /admin folder -->
         <rule name="Admin folder" stopProcessing="true">
           <match url="^admin/?" />
           <action type="None" />
         </rule>
         <!-- This rule will rewrite everything else to /www folder -->
         <rule name="www folder" stopProcessing="true">
           <match url="(.*)" />
           <action type="Rewrite" url="www/{R:1}" />
          </rule>
         </rules>
    </rewrite>

    URL Rewrite

  • Re: Moving an Application for php to iis windows server

    Nov 06, 2008 02:40 PM|murtaza_t|LINK

     There are other 2 options:

    1. Copy all the data from the www folder in the website root folder.

    2. Change Home directory path in IIS web site properties to the www folder.

    Please Mark the post as Answer if it has helped you.
    Regards,
    Murtaza
  • Re: Moving an Application for php to iis windows server

    Nov 06, 2008 02:48 PM|simerjots|LINK

    ruslany

    You could use URL rewrite module to do that. In the web.config file at the root directory add these rewrite rules:

    <rewrite>
       <rules>
         <!-- This rule will prevent rewriting if request is made to /admin folder -->
         <rule name="Admin folder" stopProcessing="true">
           <match url="^admin/?" />
           <action type="None" />
         </rule>
         <!-- This rule will rewrite everything else to /www folder -->
         <rule name="www folder" stopProcessing="true">
           <match url="(.*)" />
           <action type="Rewrite" url="www/{R:1}" />
          </rule>
         </rules>
    </rewrite>

    Thanks worked great