URL Redirect PHP script for Horde Rumi, October 12, 2008November 6, 2008 I nearly got mad implementing horde in virtualmin. Though this section will not tell how the Horde was setup. Anyways, HORDE needs to work under /horde framework. I know this can be fixed up in registry.php file and can be used as /groupware or something.But the best should be a PHP redirecting script that will call the HOST name and add up the siffix /horde/imp like that. Well, let’s come to the precise point- I want that any domain user will type http://mydomain/webmail and will see Horde IMP- the IMAP version of the Horde frameworked webmail So how to do this? 2 things need to be done- Create a /webmail alias & redirect path in Apache Default Server to /var/www/horde Create an index.php file inside /var/www/horde Put the following code in index.php<? $host=$_SERVER[‘HTTP_HOST’]; echo “$host”; ?> <?php header(“location:http://$host/horde/imp”); exit; ?> By default Horde creates a /horde in Apache default server alias & redirect section which sends back to /usr/share/horde installation path That’s it! You’re done. But, you need to restart apache after updating your alias & redirect job. In case your PHP code gives a blank output! Then you can use the following html code with java embeding- <html><head> <meta http-equiv=”refresh” content=”0; URL=/horde/imp”> <script language=”JavaScript” type=”text/javascript”> <!– function redirect() { setTimeout(“window.location.replace(‘/horde/imp’)”, 0); } –> </script> </head> That should do as well! Configurations (Linux) Scripts