Solved

Apache virualhost

Posted on 2008-10-06
11
612 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
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 …
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

688 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