I have a web application running in JBoss on www.domain.com:8080/webapp. I want users to be able to use the URL www.domain.com/company and have that redirected to www.domain.com:8080/webapp?name=company in order to present company specific logos and names for each client.

Can I do this using the rewrite engine? and use Apache as the redirect to JBoss?

link|improve this question
feedback

migrated from stackoverflow.com Jul 27 '11 at 8:49

This question came from our site for professional and enthusiast programmers.

1 Answer

If you are trying to use Apache, then give the following rewrite a try:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^/(.*)$ http://www.domain.com:8080/webapp?name=$1 [R, 301]
link|improve this answer
feedback

Your Answer

 
or
required, but never shown