0

I have www.example.com,my main site is in www.example.com/main First I want to do is to redirect from root(www.example.com) to www.example.com/main,than I want to rewrite url(www.example.com/main) to became www.examle.com Is this posible?Any help will be great.

Also I would like,if user click on the link info,he will go to(www.example.com/info) I would like to rewrite url to(info.example.com)

Tnx

1 Answer 1

0

In the VirtualHost config for www.example.com:

RewriteEngine on

RewriteRule ^/$ /main [R=301,L]
RewriteRule ^/info$ http://info.example.com [R=301,L]
1
  • Sorry,it does not work for me,I'm doing something wrong.I create .htaccess file,copy you code,and put it in to root dir.Just to make a note,I'm trying this on my website,not on localhost.Thx for response.
    – user41117
    Oct 23, 2010 at 6:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .