Redirect without changing URL

Icheb

Verified User
Joined
Sep 15, 2003
Messages
556
Location
The Netherlands
Hi,

As you all might know I have a company who also does busyness with resellers, one of them called me some time ago with a certain question about the redirection feature, I said I'd try to find how to do it, but I can't find it...

There is a user, with domain www.example.com which he wants redirected to www.e-x-a-m-p-l-e.com/somewhere/index.php. But he doesn't want the new url to appear like it does now with a normal redirection. Is it possible to somehow do this without manually adding frames to the site ?

Thanks in advance for any assistance :D

A wget example of what i mean:
wget www.example.nl
--11:06:10-- http://www.example.nl/
=> `index.html'
Resolving www.example.nl... done.
Connecting to www.example.nl[xxx.xx.xxx.xxx]:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.ex-ample.nl [following]
--11:06:11-- http://www.ex-ample.nl/
=> `index.html'
Resolving www.ex-ample.nl... done.
Connecting to www.ex-ample.nl[xxx.xx.xxx.xxx]:80... connected.
HTTP request sent, awaiting response... 200 OK

When somehting like this happens you see the 'ex-ample.nl' domain, which is NOT the intention...
 
Afaik, DA doesn't offer this (Plesk does).

There are two ways to do it; one is to create the new domain in DA as a regular domain, then find the httpd.conf file for that domain; it'll be at:

/usr/local/directadmin/data/users/newdomainuser/httpd.conf

and look for and change document root.

It'll be something like

/home/newdomainuser/domains/newdomain.com/public_html

and you should change it to:

/home/newdomainuser/domains/newdomain.com/public_html/somewhere

and then restart the httpd daemon as root:

# service httpd restart

The second way is with frames.

The advantage to the first method is that you see the page changes in the browser location bar; one advantage of the second method is it can be used to switch the user to https at the same time.

Jeff
 
Back
Top