LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Port Number Auto Append (https://www.linuxquestions.org/questions/linux-general-1/port-number-auto-append-887427/)

JJJCR 06-20-2011 10:06 PM

Port Number Auto Append
 
hi guys, we have centos and a win2k8 server. Our pos system is on the centos server. I created a HOST (A) record on win2k8. so users don't have to remember the ip address of the centos server.

so i created a friendly name like http://example:8080 and the POS web page will be loaded.

but my questions is it possible to configure the centos to automatically append the port number if the user type http://example the port :8080 will be auto added at the end of it.

is it possible to do this? Thanks.

kbp 06-20-2011 10:15 PM

Yes... you'll need to redirect the user once they hit the server on tcp/80. You can do it with html, htaccess, mod_rewite .. etc, the choice is yours.

JJJCR 06-22-2011 11:37 PM

Quote:

Originally Posted by kbp (Post 4391313)
Yes... you'll need to redirect the user once they hit the server on tcp/80. You can do it with html, htaccess, mod_rewite .. etc, the choice is yours.

hi kbp, can give a sample command using htaccess..thanks..

kbp 06-23-2011 05:39 PM

Code:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Courtesy of: http://joseph.randomnetworks.com/200...ches-htaccess/


All times are GMT -5. The time now is 08:03 AM.