Sorry, I copied the wrong lines. Here is the correct copy, with the same issue:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /home/xxx/hetz-biz ServerName blog.hetz.biz ErrorLog /home/xxx/logs/vps-net_biz-error_log LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined CustomLog /home/xxx/logs/vps-net-biz-access_log combined Options +FollowSymLinks RewriteEngine On RewriteOptions Inherit RewriteCond %{HTTP_HOST} ^blog\.hetz\.biz$ [NC] RewriteRule ^(.*)$ http://vps.net.bz/$1 [R=301,L] </VirtualHost> Hetz 2011/4/22 shimi <[email protected]> > > > 2011/4/22 Hetz Ben Hamo <[email protected]> > >> Hi, >> >> I haven't touched for quite a long time rewriterule in apache. Could >> someone help me a bit? :) >> >> 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 blog.hetz.biz (old domain) to vps.net.bz(new >> domain). >> >> 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) >> >> I wrote this file in the conf directory (it's centos) >> >> <VirtualHost *:80> >> ServerAdmin [email protected] >> DocumentRoot /home/xxxx/blog >> ServerName vps.net.bz >> ErrorLog /home/xxxx/logs/vps-net_biz-error_log >> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" >> combined >> CustomLog /home/hetz/www/logs/vps-net-biz-access_log combined >> >> Options +FollowSymLinks >> RewriteEngine On >> RewriteOptions Inherit >> RewriteCond %{HTTP_HOST} ^blog\.hetz\.biz$ [NC] >> RewriteRule ^(.*)$ http://vps.net.bz/$1 [R=301,L] >> </VirtualHost> >> >> At the moment what this does is just skipping my entire blog and jumps >> directly to my personal blog. >> >> What am I missing here? >> >> >> > You're saying you want to apply something to the site blog.hetz.biz - but > - the configuration snippet you've pasted, deals with a different domain - > vps.net.bz (as per the ServerName directive). > > Unless I am missing something very obvious - that configuration snippet is > not even supposed to have any influence on blog.hetz.biz - unless all your > domains share the same website and there's no NameVirtualHost directive on > the global configuration at all... > > -- Shimi > > -- *חץ בן חמו חץ-ביז (הוסטינג) *השכרה ואירוח של שרתים פיזיים השכרת שרתים וירטואליים מקצועיים וגדולים במחירים *קטנים* בקרו באתרנו בכתובת hetz.biz <http://www.hetz.biz/> ובבלוג שלנו: blog.hetz.biz טלפוןן: 0783333113/4/5, אימייל: [email protected] מסנג'ר: [email protected] - סקייפ: heunique
_______________________________________________ Linux-il mailing list [email protected] http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
