Cloudflare Error 1035 / 1036: Invalid request rewrite (invalid URI path / query string)
A Transform Rule (URL rewrite) produced an invalid path or query string.
Invalid request rewrite (invalid URI path)Invalid request rewrite (invalid query string) 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
Where this error sits
Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026