Need help with configuration

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 01 Mar 2014, 02:24

Need help with configuration

01 Mar 2014, 02:40

Hello,

Currently, my hosting provider is running a windows server on IIS 6 (unfortunately we cannot upgrade right now). Recently, I purchased a script called freelance cockpit 2 from codecanyon that I want to use for project management. After the install, I am supposed to have a web based portal where I can login and set everything up.

When I go to the url (for example http://www.domain.com/inst/login), it only displays a blank page, no login. So I contacted the developer. In the folder of the install there was a .htaccess file but since I told them I was on a windows server, they sent me a web.config file with the configuration(below) to use.

Code: Select all
<?xml version="1.0"?>
<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="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<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>


Unfortunately, I could not use a web.config file due to the older version of IIS 6. The workaround was to get ISAPI Rewrite according to my hosting provider and they also gave me access to the httpd.conf file. We are currently trying the lite version


Since I have access to the httpd.conf file, I read that you can move the rewrite rules from the .htaccess file into the httpd.conf file and that a specified directory can be targeted. Something like this:

(not sure if I should have given the full path or just started it from the folder itself)
Code: Select all
<Directory /server/www/webhosts/directory/directory/actualfolderwithscriptinit>

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?/$1 [L]

</IfModule>

</Directory>



So,

Even with adding the above code the program still doesn't work. Should i be transferring the contents of the web.config (xml) to to the httpd.conf file? I am new to this so anyone have any ideas?

Thanks for your help!

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Need help with configuration

03 Mar 2014, 08:16

Hello,

Please try to use the following lines:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/server/www/webhosts/directory/directory/actualfolderwithscriptinit(.*)$ index.php?$1 [L]
</IfModule>

If it still doesn't work, please try to get rewrite.log records to see what's wrong.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 0 guests