You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Juan Jesús Cremades Monserrat <re...@gmail.com> on 2010/01/21 16:59:40 UTC

[users@httpd] Redirect url and preserve new name

Hi!

I'm configuring the Apache Server. I have a server mounted with the next
url: http://VMS-GEN-000/ <http://vms-gen-000/>

And a Wiki into with  http://VMS-GEN-000/wiki/ <http://vms-gen-000/wiki/>url

I want that apache redirects to the wiki if the user types:
http://wiki.mydomain.com <http://wiki.miempresa.com/> and preserve this
prefix while browser across the wiki. for example, if types:
http://wiki.mydomain.com <http://wiki.miempresa.com/> and goes to the
Article 1, the URL will be http://wiki.mydomain.com<http://wiki.miempresa.com/>
/
Article_1

I've used this one:

Code:

RewriteEngine on
RewriteCond %{HTTP_HOST} wiki.miempresa.es
RewriteRule ^(.*)$ http://VMS-GEN-000/wiki <http://vms-gen-000/wiki>
[R=permanent,L]


Redirects fine, but when the user browse, the url
http://VMS-GEN-000/wiki<http://vms-gen-000/wiki>returns appear.

What can I do? Regards

Re: [users@httpd] Redirect url and preserve new name

Posted by Nilesh Govindarajan <li...@itech7.com>.
On 01/21/2010 09:50 PM, Eric Covener wrote:
> 2010/1/21 Juan Jesús Cremades Monserrat<re...@gmail.com>:
>> Hi!
>>
>> I'm configuring the Apache Server. I have a server mounted with the next
>> url: http://VMS-GEN-000/
>>
>> And a Wiki into with  http://VMS-GEN-000/wiki/ url
>>
>> I want that apache redirects to the wiki if the user types:
>> http://wiki.mydomain.com and preserve this prefix while browser across the
>> wiki. for example, if types: http://wiki.mydomain.com and goes to the
>> Article 1, the URL will be http://wiki.mydomain.com/
>> Article_1
>>
>> I've used this one:
>>
>> Code:
>>
>> RewriteEngine on
>> RewriteCond %{HTTP_HOST} wiki.miempresa.es
>>
>> RewriteRule ^(.*)$ http://VMS-GEN-000/wiki [R=permanent,L]
>
> You just explicitly redirected to the hostname you don't want, why?
>
>>
>> Redirects fine, but when the user browse, the url http://VMS-GEN-000/wiki
>> returns appear.
>
>
> http://httpd.apache.org/docs/2.0/mod/core.html#usecanonicalname ?
>
>

I give the same answer. You should use internal rewrite or proxypass.

BTW, what is next ? Hearing for the first time.

-- 
Nilesh Govindarajan
Site & Server Adminstrator
www.itech7.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] Redirect url and preserve new name

Posted by Eric Covener <co...@gmail.com>.
2010/1/21 Juan Jesús Cremades Monserrat <re...@gmail.com>:
> Hi!
>
> I'm configuring the Apache Server. I have a server mounted with the next
> url: http://VMS-GEN-000/
>
> And a Wiki into with  http://VMS-GEN-000/wiki/ url
>
> I want that apache redirects to the wiki if the user types:
> http://wiki.mydomain.com and preserve this prefix while browser across the
> wiki. for example, if types: http://wiki.mydomain.com and goes to the
> Article 1, the URL will be http://wiki.mydomain.com/
> Article_1
>
> I've used this one:
>
> Code:
>
> RewriteEngine on
> RewriteCond %{HTTP_HOST} wiki.miempresa.es
>
> RewriteRule ^(.*)$ http://VMS-GEN-000/wiki [R=permanent,L]

You just explicitly redirected to the hostname you don't want, why?

>
> Redirects fine, but when the user browse, the url http://VMS-GEN-000/wiki
> returns appear.


http://httpd.apache.org/docs/2.0/mod/core.html#usecanonicalname ?


-- 
Eric Covener
covener@gmail.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