-   Linux - Server (
-   -   Apache httpd.conf Redirect Subdomain (

firefly2442 09-07-2008 11:45 AM

Apache httpd.conf Redirect Subdomain
Hello all,

I'm trying to do this without using mod_rewrite in Apache. Basically, I want to be able to redirect to as well as my subdomain to

Here is my httpd.conf file:


NameVirtualHost *:80
<VirtualHost *:80>
<VirtualHost *:80>
    DocumentRoot /var/www/html/webmail
        Redirect permanent

#This works ->
Redirect permanent /webmail

I'm not quite sure what I'm doing wrong, can anyone offer advice?

Thanks in advance! :)

bathory 09-07-2008 12:14 PM


Redirect permanent
You must provide an absolute path in order for the Redirect directive to work. So I guess, the following should work:

Redirect permanent /

firefly2442 09-07-2008 12:35 PM

Awesome thanks. I can't believe I missed that. I tried it earlier but I think it was outside the virtualhost tags and so it was directing all traffic to the subdomain (obviously not what I wanted).

Thanks again! :)

basu2007 05-10-2012 01:06 AM

Redirect certain request to an given URL

I have question regarding redirecting certain request to given URL

For Example:

Would like to redirect all request other than /Webmail to //

Can you please let me know how to do it...
I need your help ASAP.....

Great Thanks
Raj & Karthik

lithos 05-10-2012 03:05 AM

It would be best if you start your own new thread with the topic that describes your problem and maybe refer to this thread in it if it's related.

Don't pull out the threads already given solution which is not yours.
If this tread doesn't help you then start a new thread with your problem described.

All times are GMT -5. The time now is 11:57 PM.