You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by vishesh kumar <li...@gmail.com> on 2011/07/30 08:28:37 UTC

[users@httpd] https redirection

Hi Members

suppose i have a site https://abc.com and i want if anyone write
https://abc.com/xyz.com , it should redirected to https://xyz.com which is
one same server. Server wide certificate installed on server . Can anyone
please help in redirection

-- 
http://linuxmantra.com

Re: [users@httpd] https redirection

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-07-30 11:08, fedora wrote:
> I usually do redirections this way:
>
> in the web http://abc.com
> I insert into the <body> tag
>
> <body onload="redix()">
>
> somewhere in the javascripts for this page I have
>
> function redix() {
>     if (window.location.search != "")) 
> window.location.replace("http://"+window.location.search)
> }    // redix
>


Do you understand you are replying to the apache httpd mailing list ?

-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] https redirection

Posted by fedora <fe...@ayni.com>.
I usually do redirections this way:

in the web http://abc.com
I insert into the <body> tag

<body onload="redix()">

somewhere in the javascripts for this page I have

function redix() {
	if (window.location.search != "")) 
window.location.replace("http://"+window.location.search)
}	// redix

suomi


On 2011-07-30 08:28, vishesh kumar wrote:
> Hi Members
>
> suppose i have a site https://abc.com and i want if anyone write
> https://abc.com/xyz.com , it should redirected to https://xyz.com which
> is one same server. Server wide certificate installed on server . Can
> anyone please help in redirection
>
> --
> http://linuxmantra.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] https redirection

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-08-04 11:35, Ashwin Kesavan wrote:
> Jeroen Geilman wrote:
>> On 2011-07-30 08:28, vishesh kumar wrote:
>>> Hi Members
>>>
>>> suppose i have a site https://abc.com and i want if anyone write 
>>> https://abc.com/xyz.com , it should redirected to https://xyz.com 
>>> which is one same server.
>>
>> Redirect Permanent /xyz.com/ https://xyz.com/
>>
>>> Server wide certificate installed on server . 
>>
>> No.
>> If the domains hosted on this server are not in the same parent zone 
>> (as you have just shown) you cannot use one certificate for both 
>> domains.
>>
>
> Look at the mod_rewrite and the directive RedirectPermanent in httpd 
> documentation to know how to use the above two to achieve the 
> objective you want. It is pretty simple and starightforward. I have 
> done that many times myself. I want you8 to learn that instead of 
> spoon feeding you. Look up for the above two keyword in httpd doc site 
> and you will have all that is required to do it. Please have the 
> habbit of searching on any search engine like google for example to 
> know how to do something before askign here. Ask only if that didnt 
> help. Please read up "how to ask smart questions" by esr in internet 
> and enlighten yourself.
>
> HTH
>

And you're telling me this because ?

-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] https redirection

Posted by Ashwin Kesavan <as...@yahoo-inc.com>.
Jeroen Geilman wrote:
> On 2011-07-30 08:28, vishesh kumar wrote:
>> Hi Members
>>
>> suppose i have a site https://abc.com and i want if anyone write 
>> https://abc.com/xyz.com , it should redirected to https://xyz.com 
>> which is one same server.
> 
> Redirect Permanent /xyz.com/ https://xyz.com/
> 
>> Server wide certificate installed on server . 
> 
> No.
> If the domains hosted on this server are not in the same parent zone (as 
> you have just shown) you cannot use one certificate for both domains.
> 

Look at the mod_rewrite and the directive RedirectPermanent in httpd 
documentation to know how to use the above two to achieve the objective 
you want. It is pretty simple and starightforward. I have done that many 
times myself. I want you8 to learn that instead of spoon feeding you. 
Look up for the above two keyword in httpd doc site and you will have 
all that is required to do it. Please have the habbit of searching on 
any search engine like google for example to know how to do something 
before askign here. Ask only if that didnt help. Please read up "how to 
ask smart questions" by esr in internet and enlighten yourself.

HTH

-- 
*ashwin*
*kesavan*

"if you can't explain it simply, you don't understand it well enough."
Albert Einstein


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] https redirection

Posted by Jeroen Geilman <je...@adaptr.nl>.
On 2011-07-30 08:28, vishesh kumar wrote:
> Hi Members
>
> suppose i have a site https://abc.com and i want if anyone write 
> https://abc.com/xyz.com , it should redirected to https://xyz.com 
> which is one same server.

Redirect Permanent /xyz.com/ https://xyz.com/

> Server wide certificate installed on server . 

No.
If the domains hosted on this server are not in the same parent zone (as 
you have just shown) you cannot use one certificate for both domains.

-- 
J.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org