Pages

Search This Blog

Showing posts with label windows server 2012. Show all posts
Showing posts with label windows server 2012. Show all posts

Thursday, October 16, 2014

404 - File or directory not found. when use codeigniter in windows iis

Facing error message when deploy codeigniter php site to windows server 2013 (iis8)


404 - File or directory not found.

The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.


The main issue is because of the url rewrite doesn't work in IIS without proper setting in web.config (IIS doesn't read .htacess)

What we need to do is open web.config

Add code below into the correct


<rewrite>
  <rules>
    <rule name="Rule" stopProcessing="true">
      <match url="^(.*)$" ignoreCase="false" />
      <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
        <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
      </conditions>
      <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
    </rule>
  </rules>
</rewrite> 

>


If you are want to create the new web.config without others configuration, the web.config shoud looks like this

<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<system.webServer>

    <httpErrors errorMode="Detailed" />
    <asp scriptErrorSentToBrowser="true"/>

   <rewrite>
  <rules>
    <rule name="Rule" stopProcessing="true">
      <match url="^(.*)$" ignoreCase="false" />
      <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
        <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
      </conditions>
      <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
    </rule>
  </rules>
</rewrite> 

</system.webServer>


</configuration> 
Hope this helps




Tuesday, June 3, 2014

sign in to google drive ... stuck in one moment please

I've installed google drive in windows server 2012 for data backup purposes but when i try to login to google drive, it's stuck in one moment please without further action.



This can be solved by adding below link as trusted site in Internet Explorer.



  • www.google.com:443/HTTPS
  • accounts.google.com:443/HTTPS
  • clients3.google.com:443/HTTPS
  • talk.google.com:5222/XMPP
  • drive.google.com:443/HTTPS
  • www.googleapis.com:443/HTTPS
  • ssl.gstatic.com:443/HTTPS
  • *.docs.google.com:443/HTTPS
  • *.drive.google.com:443/HTTPS
  • *.googleusercontent.com:443/HTTPS

Once done, i can login to google drive without any problem.

Can refer to below link to know more.
https://support.google.com/drive/answer/2589954?hl=en&topic=14951&ctx=topic

Monday, June 17, 2013

'powershell' is not recognized as an internal or external command, operable program, or batch file.

Try to install/enable GUI in windows server 2012 but first thing we need to do is use powershell. When i try to use this powershell command, it shows error message

'powershell' is not recognized as an internal or external command, operable program, or batch file.

What we can do is execute command below one by one

dism.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShellRoot
dism.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell /all

and remember to restart the server before continue.