Redirect URL , Mask address, eventually will need to apply SSL

daarchive used Ask the Experts™
Hello All,

I am trying to do a redirect, which I have been able to do using the htaccess file, but I am having trouble meeting all of my requirements.

When users go to, they need to be redirected to ip:8080/directory.

Address should be masked as

all directories for this site must be located using and there should be no imaging or access issues.

We will eventually need to add SSL to this, as it is a CRM site and the data needs to be protected.

Ive searched the net and found many articles where the code doesnt work.

Any help here is appriciated.

Thanks in advance.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
do want to do this with PHP or with apache's mod_rewrite?

here is how mod_rewrite can do it:

RewriteEngine on
RewriteCond %{SERVER_PORT} !^8080$
RewriteCond %{HTTP_HOST} ^($
RewriteRule (.*) http://ip/$1

what do you mean by?
  > Address should be masked as


I just mean i dont want the redirected address to show.

So a quick update. The redirect works, but I still see the address with the IP and not the address.

Thanks for helping with this.
ok, that's what mod_proxy is for:

ProxyRequests Off
ProxyPass / http://ip/
ProxyPassReverse / http://ip/

this should be inside a <VirtualHost> directive
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.


Do I just add this to the currently working htaccess file? Say the bottom for example?


this should be inside a <VirtualHost> directive

Also, what does this mean?
> .. currently working htaccess file?
no, it must be in apache's config file, i.e. httpd.conf

> Also, what does this mean?
you need to have a virtualhost section for your
otherwise you cannot easily redirect the urls of just that subdomain

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial