# How to set reverse proxy config in .htaccess

**URL:** https://forum.infinityfree.com/t/how-to-set-reverse-proxy-config-in-htaccess/44506
**Category:** Hosting Support
**Created:** [April 29, 2021, 8:37am UTC](https://forum.infinityfree.com/t/how-to-set-reverse-proxy-config-in-htaccess/44506 "2021-04-29T08:37:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![anon15487701](https://forum.infinityfree.com/letter_avatar/anon15487701/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon15487701](https://forum.infinityfree.com/u/anon15487701)
#### Post date: [April 29, 2021, 8:37am UTC](https://forum.infinityfree.com/t/how-to-set-reverse-proxy-config-in-htaccess/44506/1 "2021-04-29T08:37:33Z")

</div>

I want to do some thing like this - can you help to achieve

ProxyPass “/api/_" “[https://xyz.com](https://xyz.com)”  
ProxyPassReverse "/api/_” “[https://xyz.com](https://xyz.com)”

Thanks in advance

---

<div class="post-metadata">

### Author: ![TigerMANEK426](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/tigermanek426/32/12600_2.png) [@TigerMANEK426](https://forum.infinityfree.com/u/TigerMANEK426)
#### Post date: [April 29, 2021, 9:52am UTC](https://forum.infinityfree.com/t/how-to-set-reverse-proxy-config-in-htaccess/44506/2 "2021-04-29T09:52:56Z")

</div>

Please note this is free hosting, not API hosting. Proxies are also against the ToS.

---

<div class="post-metadata">

### Author: ![anon15487701](https://forum.infinityfree.com/letter_avatar/anon15487701/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon15487701](https://forum.infinityfree.com/u/anon15487701)
#### Post date: [April 29, 2021, 10:05am UTC](https://forum.infinityfree.com/t/how-to-set-reverse-proxy-config-in-htaccess/44506/3 "2021-04-29T10:05:52Z")

</div>

I know - I’m not looking to host my api here. My api is running in different hosting just need to reverse proxy to that hosting.

basically when i make ajax call to /xyz it should reverse proxy to [https://xy.z.com](https://xy.z.com) and return the data

---

<div class="post-metadata">

### Author: ![TigerMANEK426](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/tigermanek426/32/12600_2.png) [@TigerMANEK426](https://forum.infinityfree.com/u/TigerMANEK426)
#### Post date: [April 29, 2021, 10:48am UTC](https://forum.infinityfree.com/t/how-to-set-reverse-proxy-config-in-htaccess/44506/4 "2021-04-29T10:48:30Z")

</div>

You still cannot make a proxy. As it says in the ToS:

> You agree to not use the Service to
> 
> upload, post, email, transmit or otherwise make available any material that is of keylogging / proxy service / irc / shell(s) if any type / file hosting / file sharing types.
> 
> >

---

<div class="post-metadata">

### Author: ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)
#### Post date: [April 29, 2021, 3:52pm UTC](https://forum.infinityfree.com/t/how-to-set-reverse-proxy-config-in-htaccess/44506/5 "2021-04-29T15:52:50Z")

</div>

The proxy module is disabled in our webserver, or we just disabled the relevant .haccess commands.

We don’t allow any kind of proxy hosting, so there is no (legitimate) need to have that feature enabled.

Why do you need to use the proxy module to access the API? Can’t you just access the API directly from whatever code that needs to access it?

---

<div class="post-metadata">

### Author: ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)
#### Post date: [May 14, 2021, 3:52pm UTC](https://forum.infinityfree.com/t/how-to-set-reverse-proxy-config-in-htaccess/44506/6 "2021-05-14T15:52:53Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
