Created
March 16, 2019 06:42
-
-
Save musukvl/66b4a5ca4ffd10cba56596f46ec94b80 to your computer and use it in GitHub Desktop.
.htaccess file for asp.net core application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// # .htaccess content sample | |
// RewriteRule ^/apache-mod-rules-redirect/(.*) /redirected?id=$1 [L,R=302] | |
using (StreamReader apacheModRewriteStreamReader = | |
File.OpenText(".htaccess")) | |
{ | |
var options = new RewriteOptions() | |
.AddApacheModRewrite(apacheModRewriteStreamReader); | |
app.UseRewriter(options); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment