Reputation: 1127
Bit of a weird one.
One of my clients has a shared hosting server which he hosts his website on lets say:
To develop a web application for him I have had to use a different server lets say 255.255.255.255 which allows SSH access.
My client wants http://www.example.com/portal to essentially "point" or display the portal & web pages etc from server 255.255.255.255.
I know you can point domains but I have no idea where to start on something like this, any help or suggestions would be appreciated
J x
Upvotes: 0
Views: 676
Reputation: 10869
Add this to .htaccess
file placed in the root of the www.example.com site:
RewriteEngine On
RewriteRule ^portal/?(.*)$ http://255.255.255.255/$1 [P]
Upvotes: 0
Reputation:
A plain 301 redirect comes to mind:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} www.example.com/portal$ [NC]
RewriteRule ^(.*)$ http://255.255.255.255/$1 [L,R=301]
This should obviously go into the .htaccess on www.example.com
Upvotes: 1
Reputation: 12845
Better: place it on a subdomain: http://portal.example.com
Worse: proxy all request from http://www.example.com/portal to your site. But you need access to web server config - unlikely shared hosting will allow you to do it. Or you need your own hosting like VPS and so on.
Upvotes: 1