• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IIS support

#1
hi
i would like to suggest that codeigniter as it come configured with .htaccess for Apache, to be the same with web.config for IIS, instead of searching web of how to configure it
Reply

#2
(07-25-2016, 06:51 PM)ibraheem_ghazi Wrote: hi
i would like to suggest that codeigniter as it come configured with .htaccess for Apache, to be the same with web.config for IIS, instead of searching web of how to configure it

If you could provide one, we'll be happy to. It's been years since I've used IIS and never got good at it's config settings. In other words - please submit a pull request.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply

#3
(07-25-2016, 08:56 PM)kilishan Wrote: If you could provide one, we'll be happy to. It's been years since I've used IIS and never got good at it's config settings. In other words - please submit a pull request.
here is the file i attached to each project i uploaded and it's work perfect on CI3
at the bottom i added woff2 mime manually its not required
Code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.web>
  <!--<customErrors mode="Off"/>-->
    <httpRuntime maxRequestLength="2147483647" />
  </system.web>
    <system.webServer>
      <security>
  <requestFiltering>
    <requestLimits maxAllowedContentLength="2147483647"/>
    </requestFiltering>
    </security>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAll">
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
        <staticContent>
    <remove fileExtension=".woff2" />
    <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
  </staticContent>
  

    </system.webServer>

</configuration>

btw as we are in same topic i would suggest for htaccess this file which does not require the ReWrite Base

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
Reply

#4
Have you checked the repo ... there is an Apache .htaccess in the public folder ... https://github.com/bcit-ci/CodeIgniter4/.../.htaccess

Perhaps we need some installation instructions for setting up similar capability for NGINX, IIS & other popular servers.

@ibraheem_ghazi You provided a config file, I presume for IIS. What instructions would accompany it, eg where should this file go, how does IIS get configured for virtual hosting, what about DB config, etc.
Reply

#5
(07-25-2016, 11:00 PM)ciadmin Wrote: Have you checked the repo ... there is an Apache .htaccess in the public folder ... https://github.com/bcit-ci/CodeIgniter4/.../.htaccess

Perhaps we need some installation instructions for setting up similar capability for NGINX, IIS & other popular servers.

@ibraheem_ghazi You provided a config file, I presume for IIS. What instructions would accompany it, eg where should this file go, how does IIS get configured for virtual hosting, what about DB config, etc.
of course i have checked and read it but the difference that this file is not dependent on the Rewrite base which mean if you put it in sub folder or move it you don't need to re-edit .htaccess file and set the Rewrite base

for IIS nothing new just install iis with php and mysql then in IIS create a new website then set the assigned ip,port,host and path then in host if needed for localhost add the host you put
web.config file will be along side with .htaccess file

here is a video that demonstrate how to create a new website on localhost
https://www.youtube.com/watch?v=LMWW12FGoHM
Reply

#6
HI

Is it safe to assume that for the Web.config file to work as provided, one would require the URL Rewrite Mod to be installed on your IIS server?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.