httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert Vila <...@imente.com>
Subject Re: [users@httpd] Subdomains and mod_rewrite
Date Tue, 09 Nov 2004 16:12:01 GMT
This solution does not solve my problem.
It translates the old url to the new ones, and this is not what I wanted.

I want to use the new urls, not the old ones.
I want my users to surf using the spain.mydomain.com, 
spain.mydomain.com/category/list_houses_11.html, ....

My problem is how to map the spain.mydomain.com to 
www.mydomain.com/location/spain_1.html without changing the url 
(transparently for the user).

I can do the RewriteRule ^/ /.../web/index.cgi?location=1 [L] but this 
changes all urls in the spain.mydomain.com virtual host.

Albert

Eimantas Vaiciunas wrote:

>On Tuesday 09 November 2004 10:18, Albert Vila wrote:
>  
>
>>Hi all,
>>
>> I'm currently have an apache web server serving the following urls:
>>   - www.mydomain.com/location/spain_1.html
>>   - www.mydomain.com/location/french_2.html
>>   - www.mydomain.com/category/list_houses_11.html
>>
>> I've got the RewriteRule ^/location/([a-z_\(\)]*)([0-9]+).html
>>/.../web/index.cgi?location=$2 [L] in order to change the main location.
>>This location is stored in a client cookie, so the following call to
>>www.mydomain.com/category/list_houses_11.html lists all houses from the
>>correct location (the one selected by the user). I've got RewriteRule
>>^/category/([a-z_\(\)]*)([0-9]+).html /.../web/list.cgi?category_id=$2 [L]
>>to see the category list.
>>
>> Now, I wanna change the above urls for:
>>   - spain.mydomain.com
>>   - french.mydomain.com
>>   - spain.mydomain.com/category/list_houses_11.html
>>    
>>
>RewriteRule ^/location/([a-z_\(\)]*)([0-9]+).html 
>http://$1.yourdomain.com/index.cgi?location=$2 [L]
>
>---------------------------------------------------------------------
>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
>
>
>
>  
>

-- 
Albert Vila
Director de proyectos I+D
http://www.imente.com
902 933 242
[iMente La información con más beneficios]


---------------------------------------------------------------------
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


Mime
View raw message