.htaccess proxy to other server (load mod_proxy_http module)


#1

I am trying to create a proxy to another server/domain via .htaccess and I am having problems.

As a test I tried adding this .htaccess to a subfolder:

RewriteEngine on RewriteRule ^(.*)$ https://google.com/ [P]

But I get 404.

I can’t find the logs of my shared hosting but it might be the lack of module like mod_proxy_http. Any ideas?

Thanks!


#2

Pretty sure it’s only installed on VPS and better. If you want to make sure:

Create a .htaccess

<IfModule mod_proxy.c> SetEnv MOD_mod_proxy 1 </IfModule>

Run a check.shtml

[code]

[/code]

#3

Hi sXi, the environmental variable is not set :frowning:

Thanks a lot for the help anyways! :wink: