skip to Main Content

I am trying to make my site work with the IIS I have installed on the server. I also have plesk control panel installed.

I am trying to:

  1. make it look for the index.php inside the public folder and not just the httpdocs folder.

  2. make the mod_rewrite work (i’ve extracted everything out of the public folder to the httpdocs folder to check if that would work, and it does load the basic page, but can’t find anything else and says that file was not found on server).

2

Answers


  1. First of all mod_rewrite is only for unix-style servers, .htaccess doesn’t work with IIS. So you’ll have a lot of problem with ANY MVC framework which offer routing via htaccess.

    Second, IIS and PHP have many performance issues and many functions work differently from live PHP/UNIX environments. First thing (Unless they changed it) you can’t use / for file paths and must change all your paths for (escape the backslash) which becomes cumbersome or use PHP_DS constant and clutter your code… Suggestion, use an apache based server, apache CAN be installed on windows.

    Finaly, in IIS you can simple point your website directory into the public folder, but you might need to allow pĥp to move backwards in your directory structure if you use the ISAPI module. I remember once that ASP had to allow backward access in files to get out of the root folder of your IIS website. If you use the CGI version of php with IIS, you will probably NOT have this issue.

    later

    Login or Signup to reply.
  2. There is a number of links about this that can help you find your way. As @Mathieu said, mod_rewrite works only for the Apache server, not for IIS. You’ll need something like IIS URL Rewrite for that.

    The following links seem to contain quite accurate information:

    Hope that helps,

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search