You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Stéphane Neveu <st...@cetsi.fr> on 2008/02/01 10:16:15 UTC
[users@httpd] mod_rewrite
Hello all,
I'm looking for a way to rewrite this url:
http://www.domain-1.com/directory/country.php?id_rub1=32&id_rub2=66&id_rub3=107&col=32&col2=66&col3=107&*Country=4&Conc=14*
to
http://www.domain-2.com/
only when *Country=4&Conc=14* is matching.
So I wish apache2 could do something else :
When users come from http://www.domain-2.com/
apache2 should display the content of :
http://www.domain-1.com/directory/country.php?id_rub1=32&id_rub2=66&id_rub3=107&col=32&col2=66&col3=107&*Country=4&Conc=14
*but users will only see http://www.domain-2.com/ on the brower.
I really tried to find a solution by myself, but I failed.
Thank you very much for your advices.
RE: [users@httpd] mod_rewrite
Posted by Axel-Stephane SMORGRAV <Ax...@europe.adp.com>.
As I wrote, the only way to achieve this is by design of your web site, e.g. using a servlet and POST requests, or (i)frames.
-ascs
-----Message d'origine-----
De : Stéphane Neveu [mailto:stephane.neveu@cetsi.fr]
Envoyé : vendredi 1 février 2008 10:54
À : users@httpd.apache.org
Objet : Re: [users@httpd] mod_rewrite
Thanks a lot for your help
Axel-Stephane SMORGRAV wrote:
> RewriteCond %{QUERY_STRING} Country=4(&.+)?$ RewriteCond
> %{QUERY_STRING} Conc=14(&.+)?$ RewriteRule ^/directory/country.php
> http://www.domain-2.com/ [R]
>
I've just tried what you told me to do but I still get all parameters like this :
http://www.domain-2.com/?id_rub1=32&id_rub2=66&id_rub3=107&col=32&col2=66&col3=107&Country=4&Conc=14 in my browser ...
May I do something else to suppress :
?id_rub1=32&id_rub2=66&id_rub3=107&col=32&col2=66&col3=107&Country=4&Conc=14
and just see this in my browser :
http://www.domain-2.com/
Thank you again !
>
> As for your second requirement, I think it has already been widely discussed on this forum, and others, even recently. A little search through recent postings should enable you to find the answer. The solution is in the design of the web site.
>
> -ascs
>
Oops sorry , I'll take a look ...
> ________________________________
>
> De : Stéphane Neveu [mailto:stephane.neveu@cetsi.fr] Envoyé : vendredi
> 1 février 2008 10:16 À : users@httpd.apache.org Objet : [users@httpd]
> mod_rewrite
>
>
>
> Hello all,
>
> I'm looking for a way to rewrite this url:
>
> http://www.domain-1.com/directory/country.php?id_rub1=32&id_rub2=66&id
> _rub3=107&col=32&col2=66&col3=107&Country=4&Conc=14
>
> to
>
> http://www.domain-2.com/
>
> only when Country=4&Conc=14 is matching.
>
> So I wish apache2 could do something else :
>
> When users come from http://www.domain-2.com/
>
> apache2 should display the content of :
> http://www.domain-1.com/directory/country.php?id_rub1=32&id_rub2=66&id
> _rub3=107&col=32&col2=66&col3=107&Country=4&Conc=14
>
> but users will only see http://www.domain-2.com/ on the brower.
>
> I really tried to find a solution by myself, but I failed.
>
> Thank you very much for your advices.
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
--
*Stéphane** Neveu**/
/**Département Internet
*Ingénieur Système Réseaux
____________________________________
93/105, Rue Veuve Lacroix
92000 NANTERRE
E-Mail : Stéphane Neveu@cetsi.fr
http://www.cetsi.fr
Tel : 01.41.19.40.50
Fax : 01.47.60.22.16
____________________________________
*Nos métiers :* Internet, Infogestion, Systèmes et réseaux, Distribution
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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] mod_rewrite
Posted by Stéphane Neveu <st...@cetsi.fr>.
Thanks a lot for your help
Axel-Stephane SMORGRAV wrote:
> RewriteCond %{QUERY_STRING} Country=4(&.+)?$
> RewriteCond %{QUERY_STRING} Conc=14(&.+)?$
> RewriteRule ^/directory/country.php http://www.domain-2.com/ [R]
>
I've just tried what you told me to do but I still get all parameters
like this :
http://www.domain-2.com/?id_rub1=32&id_rub2=66&id_rub3=107&col=32&col2=66&col3=107&Country=4&Conc=14 in my browser ...
May I do something else to suppress :
?id_rub1=32&id_rub2=66&id_rub3=107&col=32&col2=66&col3=107&Country=4&Conc=14
and just see this in my browser :
http://www.domain-2.com/
Thank you again !
>
> As for your second requirement, I think it has already been widely discussed on this forum, and others, even recently. A little search through recent postings should enable you to find the answer. The solution is in the design of the web site.
>
> -ascs
>
Oops sorry , I'll take a look ...
> ________________________________
>
> De : Stéphane Neveu [mailto:stephane.neveu@cetsi.fr]
> Envoyé : vendredi 1 février 2008 10:16
> À : users@httpd.apache.org
> Objet : [users@httpd] mod_rewrite
>
>
>
> Hello all,
>
> I'm looking for a way to rewrite this url:
>
> http://www.domain-1.com/directory/country.php?id_rub1=32&id_rub2=66&id_rub3=107&col=32&col2=66&col3=107&Country=4&Conc=14
>
> to
>
> http://www.domain-2.com/
>
> only when Country=4&Conc=14 is matching.
>
> So I wish apache2 could do something else :
>
> When users come from http://www.domain-2.com/
>
> apache2 should display the content of : http://www.domain-1.com/directory/country.php?id_rub1=32&id_rub2=66&id_rub3=107&col=32&col2=66&col3=107&Country=4&Conc=14
>
> but users will only see http://www.domain-2.com/ on the brower.
>
> I really tried to find a solution by myself, but I failed.
>
> Thank you very much for your advices.
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>
--
*Stéphane** Neveu**/
/**Département Internet
*Ingénieur Système Réseaux
____________________________________
93/105, Rue Veuve Lacroix
92000 NANTERRE
E-Mail : Stéphane Neveu@cetsi.fr
http://www.cetsi.fr
Tel : 01.41.19.40.50
Fax : 01.47.60.22.16
____________________________________
*Nos métiers :* Internet, Infogestion, Systèmes et réseaux, Distribution
---------------------------------------------------------------------
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] mod_rewrite
Posted by Axel-Stephane SMORGRAV <Ax...@europe.adp.com>.
RewriteCond %{QUERY_STRING} Country=4(&.+)?$
RewriteCond %{QUERY_STRING} Conc=14(&.+)?$
RewriteRule ^/directory/country.php http://www.domain-2.com/ [R]
As for your second requirement, I think it has already been widely discussed on this forum, and others, even recently. A little search through recent postings should enable you to find the answer. The solution is in the design of the web site.
-ascs
________________________________
De : Stéphane Neveu [mailto:stephane.neveu@cetsi.fr]
Envoyé : vendredi 1 février 2008 10:16
À : users@httpd.apache.org
Objet : [users@httpd] mod_rewrite
Hello all,
I'm looking for a way to rewrite this url:
http://www.domain-1.com/directory/country.php?id_rub1=32&id_rub2=66&id_rub3=107&col=32&col2=66&col3=107&Country=4&Conc=14
to
http://www.domain-2.com/
only when Country=4&Conc=14 is matching.
So I wish apache2 could do something else :
When users come from http://www.domain-2.com/
apache2 should display the content of : http://www.domain-1.com/directory/country.php?id_rub1=32&id_rub2=66&id_rub3=107&col=32&col2=66&col3=107&Country=4&Conc=14
but users will only see http://www.domain-2.com/ on the brower.
I really tried to find a solution by myself, but I failed.
Thank you very much for your advices.
---------------------------------------------------------------------
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