user1638055
user1638055

Reputation: 492

Adding a 8080 to each URl using URl rewriting?

I have a domain like www.mytest.com. Now for each subpage of that page and the domain itself I want to add :8080. Like this:

www.mytest.com/correct.php --> www.mytest.com:8080/correct.php

How can I do that?

Thanks!

Upvotes: 0

Views: 62

Answers (1)

sfell77
sfell77

Reputation: 986

You can use proxy pass reverse assuming that you activate (listen on) port 8080 in your httpd.conf file or VirtualHost file assuming you're using Apache HTTPD and have root access. If not, believe you can put this into .htaccess:

<VirtualHost *:80>
...
<Proxy *>
AddDefaultCharset Off
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://www.mytest.com:8080
ProxyPassReverse / http://www.mytest.com:8080
</VirtualHost>

Upvotes: 1

Related Questions