LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-20-2011, 10:06 PM   #1
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,149

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Post 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.
 
Old 06-20-2011, 10:15 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
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.
 
Old 06-22-2011, 11:37 PM   #3
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,149

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Post

Quote:
Originally Posted by kbp View Post
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..
 
Old 06-23-2011, 05:39 PM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Courtesy of: http://joseph.randomnetworks.com/200...ches-htaccess/
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trying to number every other line and append those numbers to end of line kmkocot Programming 7 04-23-2010 11:17 AM
Port Number Paris Heng Solaris / OpenSolaris 6 01-16-2009 12:58 PM
USB to serail port adaptor COM port number areftaidi Linux - Software 2 09-25-2007 01:05 AM
Port number.... help rajsun Programming 2 04-12-2005 09:20 AM
Ip and port number Alien18 Linux - Networking 1 09-13-2004 09:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration