1035: Invalid Request Rewrite: Invalid URI PathError 1035 occurs when a Cloudflare Transform Rule (URL rewrite) generates an invalid URI path. Transform Rules let you modify request URLs, headers, and other properties at the Cloudflare edge before the request reaches your origin. If a dynamic rewrite expression produces a path that is not a valid URI — for example, containing illegal characters, missing the leading slash, or resulting in an empty path — Cloudflare returns 1035 instead of forwarding the malformed request.
Error 1035: Invalid Request Rewrite: Invalid URI PathGET /category/sale%20items HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Accept: text/htmlHTTP/1.1 409 Conflict
Server: cloudflare
CF-RAY: 7e5f6a7b8c9d0124-SOF
Content-Type: text/html
<!doctype html>
<html>
<head>
<title>www.example.com | Error 1035</title>
</head>
<body>
<h1>Error 1035: Invalid request rewrite: invalid URI path</h1>
<p>A Cloudflare Transform Rule on this site produced an invalid URI path. Please contact the site owner.</p>
</body>
</html>In the Cloudflare dashboard, go to Rules > Transform Rules. Check the URL rewrite rules and verify their expressions produce valid paths for all possible request inputs.
Identify which URL triggers the error and trace it through your rewrite rules to see what output the expression generates.
Use conditional expressions in your rewrite rules to handle edge cases where the rewrite might produce an invalid path. Add a default fallback path.
The Transform Rule's expression evaluates to a string that is not a valid URI path — it may contain spaces, special characters, or be empty.
The rewrite rule uses a variable or field that does not exist for the current request, resulting in an unexpected or empty value.
A regex-based rewrite produces malformed output due to incorrect capture group references or pattern matching.
A Cloudflare Transform Rule produced a URL that exceeds the maximum allowed length.
A Cloudflare Transform Rule's expression could not be evaluated at runtime.
A Transform Rule attempted to modify a request header that Cloudflare does not allow to be changed.
This reference was compiled from official RFCs, protocol specifications, and hands-on troubleshooting experience. AI tools were used primarily for formatting and organizing the content on the page.