Solved

Apache virualhost

Posted on 2008-10-06
11
540 Views
Last Modified: 2012-05-05
Here is my virualhost file:

What should I change to redirect actu.co.il to the same host than www.actu.co.il

Thank

Erez

NameVirtualHost *
<VirtualHost *>
      ServerAdmin webmaster@localhost
      
      DocumentRoot /root/actu.co.il/
      <Directory />
            Options FollowSymLinks
            AllowOverride All
      </Directory>
      <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
      </Directory>
0
Comment
Question by:cabou
  • 6
  • 2
11 Comments
 
LVL 29

Expert Comment

by:fosiul01
ID: 22648244
Are you trying to redirect from http://actu.co.il to www.actu.co.il  ??

in that case either you need to use Rewrite rule

or what ever programming language you are using try to redictect from there.


 
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 22648272

i never tryed this way, but it should work, let me know then i will investigate more

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com$
RewriteRule ^(.*)$ www.actu.co.il/ [R=301,L]

0
 
LVL 29

Accepted Solution

by:
fosiul01 earned 250 total points
ID: 22648280
sorry this should be like this

RewriteEngine on
RewriteCond %{HTTP_HOST} ^http://actu.co.il$
RewriteRule ^(.*)$ www.actu.co.il/ [R=301,L]
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 22648300
or check this tutorial

http://corz.org/serv/tricks/htaccess2.php

and this section : lose the "www"
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 4

Assisted Solution

by:urgoll
urgoll earned 250 total points
ID: 22650799
What is the purpose of this ? According to DNS,  actu.co.il and www.actu.co.il are the same host (same IP address). If you want both to simply work, you can add this in your virtualhost block:

    ServerName   www.actu.co.il
    ServerAlias     actu.co.il

0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23193274
Hi Sirboutry!!

I dont understand why are you closing this question without giving the points to Experts!!
We gave him the solution but he didnot acknowledge of our commetns.

so as a rule, We should get the points for solution we provided, as far i belived its workable.
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 23194537
ID:22648280
ID:22648300
ID:22650799
0
 
LVL 4

Expert Comment

by:urgoll
ID: 23206491
I second this, option #3 with:

ID:22648280
ID:22648300
ID:22650799
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now