Forum Moderators: phranque
I still got mess as the simplest codes below even can not pass:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^a\.example\.net\.nl$ [NC]
RewriteRule ^$ /products/aindex.jsp [L]
RewriteCond %{HTTP_HOST} ^b\.example\.net\.nl$ [NC]
RewriteRule ^$ /products/bindex.jsp [L]
notes:
I want to build up several simplest secondary subdomain name for the current several web-module entry. Above, as I metioned hours before, I thought it means:
if(httphost=="a.example.net.nl") then url=/products/aindex.jsp
if(httphost=="b.example.net.nl") then url=/products/bindex.jsp
not any interpretations else,right?
but in runtime, the first one interpret ok, but the next one just disappear, it went to the firt Virutalhost set in the httpd.conf, and response another absolute wrong page for me.
where I unerstood wrong for the RewriteCond as well as RewriteRule?
frederick
[edited by: jdMorgan at 1:53 pm (utc) on April 7, 2005]
[edit reason] Removed specifics per TOS. [/edit]
RewriteLog /path/to/rewrite.log
RewriteLogLevel 9
these setting I have tested for manytimes but just puzzled what the second rewritecond do not work even in the same format. however, however, however, as long as I restart it again on afternoon, for the god sake, dont ask me why, it work ok?! I do not know whether it was some cache in apache did it , I realy just do not know
frederick
More likely you already had a copy of the page at http://b.example.net.nl/ in your browser cache, so it was never re-fetched from your server. If it was not re-fetched from your server, then your code could not rewrite it.
Later in the day, your browser's cache of that page expired or was replaced by something newer, forcing a re-fetch, and then your rewrite code was invoked.
Jim