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

web.config: Redirect http naar https

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

web.config: Wordpress URL Rewrite

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

301 Redirect

Hoe maak ik een 301 redirect aan van bv test1.nl naar test2.nlRewriteEngine OnRewriteCond...

Wat staat er geinstalleerd op mijn server?

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

htaccess: Magento Url Rewrite

Plaats de volgende code in het .htaccess bestand: RewriteEngine on#RewriteBase...