0

I want to type

http://example.com

and access

http://example.com:8080

but I want the browser address bar still displays

http://example.com

Is it possible to do that only using the .htaccess file?

Paulo Alexandre
  • 764
  • 1
  • 9
  • 20

2 Answers2

0

There is an answer to another question on stackoverflow that is similar but different. You should be able to do something like this in your htaccess file:

RewriteEngine On
RewriteRule ^/(.*)$ http://example.com:8080/$1 [L,P]

ProxyPassReverse / http://example.com:8080/

This will take incoming requests and rewrite them on the Apache server and return the response from the other server internally.

https://stackoverflow.com/a/12812041/1569370

Community
  • 1
  • 1
TheGrandPackard
  • 611
  • 4
  • 11
0

In .htaccess file:

RewriteEngine On
RewriteRule (.*) http://example.com:8080/$1 [P]

Works for me.

Paulo Alexandre
  • 764
  • 1
  • 9
  • 20