Apache HTTP to HTTPS Redirection on Non-Standard Port!!!
Dear Members,
I want to achieve HTTP to HTTPs Redirection on Non-Standard Port using Apache. I have a URL http://mail.mydomain.com:9000/ which I want redirect to https://mail.mydomain.com:9000/. I am currently using it in Apache using Redirect http://mail.mydomain.com:9000/ https://mail.mydomain.com:9000/ but it's not working at all. Can anyone help? |
Quote:
Code:
Redirect / https://mail.mydomain.com:9000/ |
Finally I am able to configure it with two listeners. I configure the apache to listen on two ports "Listen 80" and "Listen 9000" and Redirect it one using simple "Redirect / https://mail.mydomain.com:9001/" and other in virtual host <VirtualHost *:80> Redirect / https://mail.mydomain.com/ </VirtualHost>
But it's an IP based redirection. Now I want to achieve hostname based Redirection. I am running a mail server and have different domains hosted on it. I want every http://hostname which resolve to my IP to https://hostname. Anyone who can help me with that? |
Quote:
<VirtualHost 192.168.1.1:80> ServerName mail.boogyman.com Redirect / https://mail.boogymain.com </VirtualHost> <VirtualHost 192.168.1.1:80> ServerName mail.thunderbird.com Redirect / https://mail.thunderbird.com </VirtualHost> But I need a more generic way because I have 100 of domains hosted at Mail Server. Any possible way? |
But I need a more generic way because I have 100 of domains hosted at Mail Server. Any possible way?
Then you should use mod_rewrite: Code:
RewriteEngine on |
Quote:
|
Quote:
Code:
RewriteEngine on |
Dear,
Now I face another issue. I installed awstats and now Webserver is listening on port 8000. I want to redirect http://<ip>:8000/awstats to http://<ip>:8000/awstats/awstats.pl?config=mywebsite.com. I am doing it using Redirect but it isn't working at all? Any suggestions. |
Quote:
Code:
RewriteEngine On |
All times are GMT -5. The time now is 06:51 AM. |