[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Rewrite rule not working for WordPress subdirectory

69 views · 0 likes · 3 posts


D1d4r (@d1d4r) · 2024-12-24

I'm trying to rewrite WordPress URLs to another domain but the following rule isn't working:

```json
{
  "rewrites": [
    {
      "source": "/kurdish/wp(.*)",
      "destination": "https://example.com/kurdish/wp$1"
    }
  ]
}
```

but when i put `"cleanUrls": true` it works perfectly

Expected behavior:

* /kurdish/wp-admin → https://example.com/kurdish/wp-admin
* /kurdish/wp-login.php → https://example.com/kurdish/wp-login.php

Current behavior: 
- 404 Not Found

Vercel deployment details:

* Framework: sveltekit
* Node.js version: 20


system (@system) · 2024-12-24

There's another community post with 404 debugging tips that might be helpful. Please give these solutions a try and let us know how it goes.

https://community.vercel.com/t/debugging-404-errors/437

A human should be around soon to offer more advice. But you can also get helpful information quickly by asking [v0](https://v0.dev/).


system (@system) · 2026-01-20

Hey @d1d4r! 👋

Just wanted to follow up here. If you've found a solution or still need help, let us know! We're happy to continue assisting.