Cloudflare Error 1035 / 1036: Invalid request rewrite (invalid URI path / query string)
A Transform Rule (URL rewrite) produced an invalid path or query string.
Seen on:
Cloudflare
Meaning
Rewrite expressions that build a path without a leading slash, include illegal characters, or create an invalid query string make Cloudflare reject the request.
Common causes
- Rewrite expression produces a path without leading “/”
- Invalid characters or encoding in the rewritten URL
- Concat/regex_replace mistakes in the expression
⚡ Quick fix
- Test the rewrite expression with sample URLs
- Ensure the new path starts with /
- Disable the rule to confirm
Detailed fix by platform
Cloudflare
- bash
# Rules → Transform Rules → Rewrite URL: example dynamic path concat("/v2", http.request.uri.path)
How to diagnose
- Rule — Which rewrite matched?
- Output — Resulting path/query
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Cloudflare
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026