+ Reply to Thread
Results 1 to 6 of 6

Thread: URL Rewriting in .htaccess file : simple question

  1. #1
    Junior Member raphaelc is on a distinguished road
    Join Date
    Dec 2011
    Posts
    12

    URL Rewriting in .htaccess file : simple question

    Hello.
    I have a simple question but just can't get it to work right. I am trying to do a url rewriting in .htaccess file, and I have 2 domains at host1free, so i have the following :

    root/domains/myaccount.oliwy.net/
    root/domains/website.com/

    I would like all URLs requested on website.com to land on myaccount.oliwy.net, but I want to see website.com in the URL.
    For exemple, if someone requests

    http://www.website.com/blabla/file.php?p=0&p=1

    I want him to be r'edirected to

    http://myaccount.oliwy.net/somepath/...le.php?p=0&p=1

    but I want to have the original URL still displaying in the browser. How can I do this ?

    Thanks for your help.

  2. #2
    Junior Member raphaelc is on a distinguished road
    Join Date
    Dec 2011
    Posts
    12

    Re: URL Rewriting in .htaccess file : simple question

    also, I did this which works but displays the redirected URL instead of the original URL in the browser :

    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST} website.com
    RewriteRule ^(.*)$ http://myaccount.oliwy.net/somepath/$1 [L]

  3. #3
    Super Moderator Modestas is on a distinguished road Modestas's Avatar
    Join Date
    Jun 2011
    Posts
    1,859

    Re: URL Rewriting in .htaccess file : simple question

    Hello,

    I am not sure 100%, but you might try to use Domain pointers. It will point one domain to another.

  4. #4
    Junior Member raphaelc is on a distinguished road
    Join Date
    Dec 2011
    Posts
    12

    Re: URL Rewriting in .htaccess file : simple question

    Thanks for your reply. How do I use Domain pointers ? I went to DNS Management for the domain name, I know I have to do something in Add Domain Records, but what exactly ? Should I set the PTR field to something ?

    Thanks for your help.

  5. #5
    Super Moderator Modestas is on a distinguished road Modestas's Avatar
    Join Date
    Jun 2011
    Posts
    1,859

    Re: URL Rewriting in .htaccess file : simple question

    It is located not in DNS Management, but under Advanced Features. Check here for more information Site-Helper.com -- Helping you get the most out of DirectAdmin and your web site!

  6. #6
    Junior Member raphaelc is on a distinguished road
    Join Date
    Dec 2011
    Posts
    12

    Re: URL Rewriting in .htaccess file : simple question

    Big thanks. Exactly what I was looking for.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34