Forum Moderators: phranque
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?blog\.example\.com\.br$ [NC]
RewriteRule ^(.*)$ http://www.example.com.br/blog/$1 [R=301,L]
but sometimes when I type the address, it don't find the address, go to msn search pages and so...
I tryed to put this on / (site root):
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?blog\.example\.com\.br$ [NC]
RewriteRule ^(.*)$ http://www.example.com.br/$1 [R=301,L]
seems working, but I don't know its right or will work later..
[edited by: jdMorgan at 9:15 pm (utc) on Jan. 31, 2004]
[edit reason] No personal URLs. Please see TOS. [/edit]
[edited by: jdMorgan at 9:16 pm (utc) on Jan. 31, 2004]
[edit reason] Examplified URLs. [/edit]
Welcome to WebmasterWorld [webmasterworld.com]!
sometimes when I type the address, it don't find the address, go to msn search pages
This sounds like two problems. One of which is that your PC has a domain hijacker on it. Try LavaSoft's AdAware, and SpyBot Search and destroy (do a search for them), both free malware removers.
I would also suggest that you do not end-anchor your domain patterns. Just use:
RewriteCond %{HTTP_HOST} ^(www\.)?blog\.example\.com\.[b]br[/b] [NC]
ALso, remember to flush your browser cache (Temporary Internet Files) every time you test a new rule.
Other than that, your code looks fine. If trouble persists, you may have a DNS problem.
Jim