How do you redirect a URL with a port number in Apache Tomcat 8.0.9 so that user cannot see port number -


i using redhat , trying redirect url in apache tomcat. example have web address http ://example:8282. want redirect page when type http ://example/alfresco shows http ://example/alfresco in browser, user cannot see port number. have been successful in redirecting not redirecting , keeping url want redirected actual url, not want seen.

things have tried in /etc/httpd/conf/httpd.conf

# redirect permanent /alfresco http://<ip address>:8282/ # 

i tried

# redirectmatch ^/tomcat/(*)$ http://<ip address>:8282/$1 # 

i tried

# rewriteengine on rewritecond %<ip address>:8282   !^1.1.33.201\/tomcat rewritecond %<ip address>:8282   !^$ rewritecond %8080                !80$ rewriterule ^tomcat/?$           http://<ip-address> [pt] # 

thank you, appreciated

because think there fundamental mistake, first try redefine important points @ first , point solution:

redirects: can not hide port or url using redirects because redirects doing - redirecting. if configure them when user enters http://example/alfresco, redirected http://example:8282/alfresco.

ports: when point browser http://example/ loads host example on port 80 http://example:80/. reason port hidden because 80 default port http protocol browsers set hide default. not true other ports, when access http://example:8282/ example.

solution: hide non-standard port, or other address not want seen, need proxy it. case suggest proxypass. working example can seen here: https://stackoverflow.com/a/7818502/2948573


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -