<div dir="rtl"><div dir="ltr">Sorry, I copied the wrong lines. Here is the correct copy, with the same issue:</div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><VirtualHost *:80></div><div dir="ltr">ServerAdmin <a href="mailto:hetz@benhamo.org">hetz@benhamo.org</a></div>
<div dir="ltr">DocumentRoot /home/xxx/hetz-biz</div><div dir="ltr">ServerName <a href="http://blog.hetz.biz">blog.hetz.biz</a></div><div dir="ltr">ErrorLog /home/xxx/logs/vps-net_biz-error_log</div><div dir="ltr">LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined</div>
<div dir="ltr">CustomLog /home/xxx/logs/vps-net-biz-access_log combined</div><div dir="ltr"><br></div><div dir="ltr">Options +FollowSymLinks</div><div dir="ltr">RewriteEngine On</div><div dir="ltr">RewriteOptions Inherit</div>
<div dir="ltr">RewriteCond %{HTTP_HOST} ^blog\.hetz\.biz$ [NC]</div><div dir="ltr">RewriteRule ^(.*)$ <a href="http://vps.net.bz/$1">http://vps.net.bz/$1</a> [R=301,L]</div><div dir="ltr"></VirtualHost></div><div><br>
</div><div>Hetz</div><br><div class="gmail_quote">2011/4/22 shimi <span dir="ltr"><<a href="mailto:linux-il@shimi.net">linux-il@shimi.net</a>></span><br><blockquote class="gmail_quote" style="margin:0 .8ex;border-left:1px #ccc solid;border-right:1px #ccc solid;padding-left:1ex;padding-right:1ex">
<br><br><div class="gmail_quote"><div><div></div><div class="h5">2011/4/22 Hetz Ben Hamo <span dir="ltr"><<a href="mailto:hetzbh@gmail.com" target="_blank">hetzbh@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 .8ex;border-left:1px #ccc solid;border-right:1px #ccc solid;padding-left:1ex;padding-right:1ex">
<div dir="rtl"><div dir="ltr">Hi,</div><div dir="ltr"><br></div><div dir="ltr">I haven't touched for quite a long time rewriterule in apache. Could someone help me a bit? :)</div><div dir="ltr"><br></div><div dir="ltr">
I have one domain which is hosting my blog and I'm changing the blog domain name, so natually I want the rewriterule to replace automatically everyone that comes from domain <a href="http://blog.hetz.biz" target="_blank">blog.hetz.biz</a> (old domain) to <a href="http://vps.net.bz" target="_blank">vps.net.bz</a> (new domain).</div>
<div dir="ltr"><br></div><div dir="ltr">At first I thought adding a simple ServerAlias and be done with it. It seems to work technically but it misses the point, I want to move permanently (301)</div><div dir="ltr"><br></div>
<div dir="ltr">I wrote this file in the conf directory (it's centos)</div><div dir="ltr"><br></div><div dir="ltr"><VirtualHost *:80></div><div dir="ltr"><div dir="ltr">ServerAdmin <a href="mailto:hetz@benhamo.org" target="_blank">hetz@benhamo.org</a></div>
<div dir="ltr">DocumentRoot /home/xxxx/blog</div><div dir="ltr">ServerName <a href="http://vps.net.bz" target="_blank">vps.net.bz</a></div><div dir="ltr">ErrorLog /home/xxxx/logs/vps-net_biz-error_log</div><div dir="ltr">
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined</div>
<div dir="ltr">CustomLog /home/hetz/www/logs/vps-net-biz-access_log combined</div><div dir="ltr"><br></div><div dir="ltr">Options +FollowSymLinks</div><div dir="ltr">RewriteEngine On</div><div dir="ltr">RewriteOptions Inherit</div>
<div dir="ltr">RewriteCond %{HTTP_HOST} ^blog\.hetz\.biz$ [NC]</div><div dir="ltr">RewriteRule ^(.*)$ <a href="http://vps.net.bz/$1" target="_blank">http://vps.net.bz/$1</a> [R=301,L]</div><div dir="ltr"></VirtualHost></div>
<div><br>
</div><div>At the moment what this does is just skipping my entire blog and jumps directly to my personal blog.</div><div><br></div><div>What am I missing here?</div><div><br><br></div></div></div></blockquote></div></div>
<div><br>You're saying you want to apply something to the site <a href="http://blog.hetz.biz" target="_blank">blog.hetz.biz</a> - but - the configuration snippet you've pasted, deals with a different domain - <a href="http://vps.net.bz" target="_blank">vps.net.bz</a> (as per the ServerName directive). <br>
<br>Unless I am missing something very obvious - that configuration snippet is not even supposed to have any influence on <a href="http://blog.hetz.biz" target="_blank">blog.hetz.biz</a> - unless all your domains share the same website and there's no NameVirtualHost directive on the global configuration at all...<br>
<br>-- Shimi<br></div></div><br></blockquote></div></div><br clear="all"><br>-- <br><div dir="rtl"><div style="color:rgb(0, 0, 0);font-family:Verdana, Arial, Helvetica, sans-serif;margin-top:8px;margin-right:8px;margin-bottom:8px;margin-left:8px;background-color:rgb(255, 255, 255)">
<p dir="rtl" style="font-size:10px"><strong><span style="font-size:small"><span style="color:rgb(0, 0, 128)"><span style="color:rgb(0, 0, 0);font-weight:normal">חץ בן חמו</span><br>ח</span><span style="color:rgb(0, 0, 255)">ץ</span>-<span style="color:rgb(0, 0, 128)">ב</span><span style="color:rgb(0, 0, 255)">י</span><span style="color:rgb(51, 102, 255)">ז</span> (<span style="color:rgb(128, 0, 0)">הוסטינג</span>)<br>
</span></strong><span style="font-size:small">השכרה ואירוח של שרתים פיזיים<br></span><span style="font-size:small">השכרת שרתים וירטואליים מקצועיים וגדולים במחירים <b>קטנים</b><br>בקרו באתרנו בכתובת <a href="http://www.hetz.biz/" style="background-color:rgb(219, 216, 222)" target="_blank">hetz.biz</a> ובבלוג שלנו: <a href="http://blog.hetz.biz/" style="background-color:rgb(219, 216, 222)" target="_blank">blog.hetz.biz</a> <br>
</span><span style="font-size:small">טלפוןן: 0783333113/4/5, אימייל: <a href="mailto:sales@hetz.biz" target="_blank">sales@hetz.biz</a> <br></span><span style="font-size:small">מסנג'ר: <a href="mailto:sales@hetz.biz" target="_blank">sales@hetz.biz</a> - סקייפ: heunique</span></p>
</div></div><br>
</div>