web.config: Pagekit URL Rewrite

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
<defaultDocument>
<files>
<clear />
<add value="index.php" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
</files>
</defaultDocument>
<httpErrors errorMode="DetailedLocalOnly" existingResponse="Auto" />
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" ignoreCase="false" />
<add input="{HTTP_HOST}" pattern="^www\." negate="true" />
</conditions>
<action type="Redirect" url="https://www.{HTTP_HOST}{URL}" redirectType="Permanent" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^www\.(.+)$" />
</conditions>
<action type="Redirect" url="https://{C:1}{URL}" redirectType="Permanent" />
</rule>
<rule name="Imported Rule 3" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTPS}" pattern="off" ignoreCase="false" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{URL}" redirectType="Found" />
</rule>
<rule name="Imported Rule 4" stopProcessing="true">
<match url="^" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>


Was dit antwoord nuttig?

 Print dit artikel

Lees ook

Url rewrite via de web.config

Om op jouw site URL's te heschrijven via het bestand web.config dan zijn de volgende stappen...

web.config: Magento Url Rewrite

Magento URL Rewrite via web.config. Voeg de volgende regels toe aan de web.config:...

web.config: Redirect http naar https

<rewrite>       <rules> <rule name="Redirect to HTTPS" stopProcessing="true">...

htaccess: Redirect http verkeer naar https

Plaats de volgende code in je .htaccess bestand: RewriteEngine on #Fix missing trailing slash...

Wat staat er geinstalleerd op mijn server?

Om te controleren wat er op uw server geinstalleerd staat kunt u onderstaande stappen...