# Redirect Kirby Website except the panel

**URL:** <https://forum.getkirby.com/t/redirect-kirby-website-except-the-panel/17432>\
**Category:** Questions\
**Tags:** v3\
**Created:** [February 27, 2020, 10:14am UTC](https://forum.getkirby.com/t/redirect-kirby-website-except-the-panel/17432 "2020-02-27T10:14:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ebbel](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@Ebbel](https://forum.getkirby.com/u/Ebbel)\
**Post date:** [February 27, 2020, 10:14am UTC](https://forum.getkirby.com/t/redirect-kirby-website-except-the-panel/17432/1 "2020-02-27T10:14:46Z")

</div>

Is it possible to redirect a whole kirby page to another Website, but leave the Panel up?  
With my current htaccess file The panel and the loginform wont load. Do I have to include some more kirby files for it to work? I’ve thought including the panel pages and the index.php would be enough.

```
RewriteCond %{REQUEST_URI} !^/panel/$
RewriteCond %{REQUEST_URI} !^/panel/login
RewriteCond %{REQUEST_URI} !^/index.php$
RewriteRule (.*) https://www.newdomain.com/$1 [R=301,L]

```

---

<div class="post-metadata">

**Author:** ![nilshoerrmann](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/nilshoerrmann/32/6005_2.png) [@nilshoerrmann](https://forum.getkirby.com/u/nilshoerrmann)\
**Post date:** [February 27, 2020, 10:17am UTC](https://forum.getkirby.com/t/redirect-kirby-website-except-the-panel/17432/2 "2020-02-27T10:17:09Z")

</div>

The panel calls the Kirby API so have you tried whitelisting `/api/` as well?

---

<div class="post-metadata">

**Author:** ![Ebbel](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@Ebbel](https://forum.getkirby.com/u/Ebbel)\
**Post date:** [February 27, 2020, 10:22am UTC](https://forum.getkirby.com/t/redirect-kirby-website-except-the-panel/17432/3 "2020-02-27T10:22:06Z")

</div>

Ive updated my .htaccess accordingly to include all subpages of panel and api but sadly the panel still wont load up.

```
RewriteCond %{REQUEST_URI} !^/panel/(.*)$
RewriteCond %{REQUEST_URI} !^/api/(.*)$
RewriteCond %{REQUEST_URI} !^/index.php$
RewriteRule (.*) https://www.newdomain.com/$1 [R=301,L]
```

---

<div class="post-metadata">

**Author:** ![Ebbel](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@Ebbel](https://forum.getkirby.com/u/Ebbel)\
**Post date:** [February 27, 2020, 10:23am UTC](https://forum.getkirby.com/t/redirect-kirby-website-except-the-panel/17432/4 "2020-02-27T10:23:58Z")

</div>

I checked the Network Tab in Chrome and saw alot of blocked request.  
They all tried to access /media when adding /media to the htaccess the panel now works!

```
RewriteCond %{REQUEST_URI} !^/panel/(.*)$
RewriteCond %{REQUEST_URI} !^/api/(.*)$
RewriteCond %{REQUEST_URI} !^/media/(.*)$
RewriteCond %{REQUEST_URI} !^/index.php$
RewriteRule (.*) https://www.newdomain.com/$1 [R=301,L]
```

---

<div class="post-metadata">

**Author:** ![nilshoerrmann](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/nilshoerrmann/32/6005_2.png) [@nilshoerrmann](https://forum.getkirby.com/u/nilshoerrmann)\
**Post date:** [February 27, 2020, 10:42am UTC](https://forum.getkirby.com/t/redirect-kirby-website-except-the-panel/17432/5 "2020-02-27T10:42:55Z")

</div>

Great you got it working! Keep in mind that whitelisting the `media` folder will keep all your image accessible for someone who knows the URLs. That might not be very likely, but still something to consider.
