Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Logger throwing an error #3

@juanp123

Description

@juanp123

Turning on logging with

RewriteLog "log.txt"
RewriteLogLevel 9

cause an error
Failed to map the path '/log.txt'.

pathRoot = Path.DirectorySeparatorChar.ToString();

Line 217: // our web application root directory
Line 218: if (pathRoot == Path.DirectorySeparatorChar.ToString())
Line 219: path = HostingEnvironment.MapPath( path);

Source File: C:\Orchard.Source.1.6\src\managedfusion-rewriter-master\src\RuleSet.cs Line: 219

I believe what you want in the code above the error is as follows, so that the mapping is relative to the application path. I have not tested all the code paths though, so this may introduce other errors.

path = "~" + pathRoot + path;

(and not path = pathRoot + path; )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions