aspose file tools*
The moose likes Tomcat and the fly likes Conditionnal mod_rewrite - How to ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Conditionnal mod_rewrite - How to ?" Watch "Conditionnal mod_rewrite - How to ?" New topic
Author

Conditionnal mod_rewrite - How to ?

Franck Tranchant
Ranch Hand

Joined: Aug 07, 2003
Posts: 75
Hi

I'm very new at mod_rewriting and i wonder how i could set up this kind of logic :

if (url.contains("aaa")){
redirect http://www.my_first_domain.com
exit
}
if (url.contains("bbb")){
redirect to http://www.my_second_domain.com
exit
}

Could someone give me the first steps ?


Franck<p>--------------------
Franck Tranchant
Ranch Hand

Joined: Aug 07, 2003
Posts: 75
Just in case someone is interested, I find a simple way to do that using only RedirectMatch. Actually, RewriteCond + RewriteRule were not necessary.

Instructions below work fine :


So simple..

[ October 04, 2006: Message edited by: Franck Tranchant ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Conditionnal mod_rewrite - How to ?