| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-07-2008, 11:45 AM
|
#1
|
|
Member
Registered: Apr 2003
Location: USA
Distribution: Ubuntu
Posts: 95
Rep:
|
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 http://www.mydomain.com/webmail/ to https://www.mydomain.com/webmail/ as well as my subdomain http://webmail.mydomain.com to https://webmail.mydomain.com
Here is my httpd.conf file:
Code:
NameVirtualHost *:80
<VirtualHost *:80>
</VirtualHost>
<VirtualHost *:80>
ServerName webmail.mydomain.com
ServerAlias www.webmail.mydomain.com
DocumentRoot /var/www/html/webmail
Redirect permanent webmail.mydomain.com https://webmail.mydomain.com
</VirtualHost>
#This works ->
Redirect permanent /webmail https://webmail.mydomain.com
I'm not quite sure what I'm doing wrong, can anyone offer advice?
Thanks in advance! 
|
|
|
|
09-07-2008, 12:14 PM
|
#2
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,397
|
You must provide an absolute path in order for the Redirect directive to work. So I guess, the following should work:
Code:
Redirect permanent / https://webmail.mydomain.com
|
|
|
|
09-07-2008, 12:35 PM
|
#3
|
|
Member
Registered: Apr 2003
Location: USA
Distribution: Ubuntu
Posts: 95
Original Poster
Rep:
|
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! 
|
|
|
|
05-10-2012, 01:06 AM
|
#4
|
|
LQ Newbie
Registered: May 2012
Posts: 1
Rep: 
|
Redirect certain request to an given URL
Hi,
I have question regarding redirecting certain request to given URL
For Example:
Would like to redirect all request other than /Webmail to //webmail.raj.net...
Can you please let me know how to do it...
I need your help ASAP.....
Great Thanks
Raj & Karthik
|
|
|
|
05-10-2012, 03:05 AM
|
#5
|
|
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:31 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|