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
Solved

Apache virualhost

Posted on 2008-10-06
11
585 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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…
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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