LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   change the effect of 302 Found with apache (https://www.linuxquestions.org/questions/linux-server-73/change-the-effect-of-302-found-with-apache-617908/)

coal-fire-ice 02-01-2008 06:13 AM

change the effect of 302 Found with apache
 
I am currently in the process of retiring an old server, it is currently running apache 1.3, if an A record of a website is pointing at the server, but there is no definition of the site in apache, it gives a 302, and forwards the request to the servers primary hostname and domain. what i want to do is have apache put up a page with the name of the domain they requested in the address bar, instead of forwarding the user to a different domain.
i.e. if someone requests the server on its ip address, it should not forward their requiest to host.example.com, but rather just serve the default page on that ip address.
this will allow me to write a script to forward them to the correct server.

any help would be greatly appreciated

frndrfoe 02-02-2008 04:09 PM

Maybe I am not understanding your question correctly, but you could just define the virtual host as:
Code:

<VirtualHost *:80>
    ServerName www.pickle.org
    Redirect / "http://dill.pickle.org/"
</VirtualHost>


coal-fire-ice 02-04-2008 07:35 AM

thanks for your help, that wasnt it, but i solved the problem over the weekend.


All times are GMT -5. The time now is 04:39 AM.