Redirect to a Port in Domain

-1

What friends my question is I have a web portal with example address: www.miportal.com but I need to access a system but it is entered through port 81 sistemaxy.miportal.com:81 how can I do that? Thank you in advance for your help.

    
asked by WilsonicX 02.03.2018 в 19:35
source

1 answer

1

Depending on where your site is you can configure the port of entry.

If you have VPS or dedicated server you can configure the vhosts file to indicate that requests are only accessed by puerto 81 . For example:

<VirtualHost *:81>
 ...
</VirtualHost>

If it is a shared server you can put a rule with htaccess. For example

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.midominio.com$
RewriteRule ^.*$ "http\:\/\/127\.0\.0\.1\:2222%{REQUEST_URI}" [P,QSA,L]

127.0.0.1 is the address of your server.

    
answered by 02.03.2018 / 21:20
source