PHP mail on IIS Windows 2016 Server

How?

IIS MANAGER
Configure SMTP E-mail here to send using an external mailserver will work for ASP scripts – Deliver to SMTP server with credentials

IIS 6.0 MANAGER
Configure the SMTP server here to make the PHP mail-function work.
Properties:
Access-Connection – Grant only your own server IP and 127.0.0.1
Access-Relay – Grant only your own server IP and 127.0.0.1
Delivery-outbound security – Basic Auth login details TLS
Delivery-Advanced – Smart Host smtp server name

PHP.INI
SMTP = 127.0.0.1
smtp_port = 25

SERVICES
configure SMTPSVC to start automatic, so you won’t go crazy after your next reboot…

301-redirect

Ja, http://blog.mybrain.nl/ is verhuisd naar https://markohoven.com/
Hoe doe je dit nu op een correcte manier?
Binnen IIS kan dit met web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <system.webServer>
  <httpRedirect enabled="true" destination="https://markohoven.com" httpResponseStatus="Permanent" />
  <defaultDocument enabled="true">
   <files>
    <clear />
     <add value="index.php" />
     <add value="index.htm" />
     <add value="index.html" />
     <add value="default.asp" />
     <add value="default.aspx" />
     <add value="default.htm" />
     <add value="default.html" />
    </files>
   </defaultDocument>
   <httpErrors errorMode="Custom">
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
   </httpErrors>
  </system.webServer>
</configuration>

Een andere mogelijkheid is in code… Continue reading 301-redirect

web.config rules for everything

new knowledge, original post can be found here.

10 URL Rewriting Tips and Tricks

This post describes some of the tips and tricks that one may find useful when solving URL-based problems for their web server or web site. Each tip/trick has a description of a problem and then an example of how it can be solved with IIS 7 URL Rewrite Module.

  1. Add or Remove Trailing Slash
  2. Enforce Lower Case URLs
  3. Canonical Hostnames
  4. Redirect to HTTPS
  5. Return HTTP 503 Status Code in Response
  6. Prevent Image Hotlinking
  7. Reverse Proxy to Another Site/Server
  8. Preserve Protocol Prefix in Reverse Proxy
  9. Rewrite/Redirect Based on Query String Parameter
  10. Avoid Rewriting of Requests for ASP.NET Web Resources

Continue reading web.config rules for everything

Domain Names = Real Estate

weakest-linkLike your office or your house; Your domain name is the address where people can find you. Like real estate, not all addresses are available, and some addresses are more expensive than others.

It used to be easy: You registered a .com for international business, .org for organisations, or .nl if you only operate in the Netherlands, plus Continue reading Domain Names = Real Estate