Solved

Apache virualhost

Posted on 2008-10-06
11
575 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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
 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 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