Results 1 to 6 of 6
  1. #1

    Modrewrite accross domain

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    That's the wordpress .htaccess

    I tried to change the .htaccess to explicitly tell thedomain name.

    So,

    PHP Code:
    RewriteRule . /index.php [L
    becomes RewriteRule . http://genetips.com/index.php [L]

    Then I tried copy the .htaccess to another domain. I thought I'll create a mirror. However, rather than a mirror, the http://anotherdomain.com/bla simply REDIRECT to http://genetips.com/index.php

    How do I ensure that http://anotherdomain.com/bla display the content of http://genetips.com/index.php without redirecting?

    Where can I learn more about modrewrite? Is there a more appropiate forum?

  2. #2
    To put it more flatly, [R] means redirecting right. Is there an anti [R] flag?

  3. #3
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    As soon as you specify a full url (http://xxx) you will get a redirect - with or without [R].

    I don't see what you're trying to do here. If anotherdomain.com is a mirror hosted on another server, don't you want it to display it's own copy of index.php? (in which case the original rule will work).
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  4. #4
    I am trying to create a mirror. Yes. So, by specifying the full URL, I got a redirect. Is there absolutely no way to avoid this behavior?

  5. #5
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    A mirror, to me anyway, would hold its own copies of the files and data on the main server and serve content from these copies on request.

    Is this really what you want or are you looking for a proxy, which will fetch content from the main server in the background?
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  6. #6
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    You may add the following code inside the index.php of the anotherdomain.com/bla ,ie inside /home/username/public_html/ba. Once this is added, if you take http://anotherdomain.com/bla in the browser it will show the contents of http://genetips.com/index.php

    <?php
    header("Location: http://genetips.com/index.php");
    ?>
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

Posting Permissions

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