Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I want to redirect everything to example.com from xyz.com but except admin/* and user/* pages.
I am using htaccess in Drupal 7 and Drupal 6.
Please review this thread before you answer.
Comments
Comment #2
nitin.k CreditAttribution: nitin.k as a volunteer and commentedComment #3
Jibus CreditAttribution: Jibus commentedDid you try using the custom rules ?
Comment #4
nitin.k CreditAttribution: nitin.k as a volunteer and commentedyeah,
I am sending you the rules list, you also try them in Default Drupal site (version - 7).
Above code redirects everything.
Above code redirects only root URL.
I am looking for a solution where site redirects each page to dummysite1 except page-one and page-two.
Comment #5
Jibus CreditAttribution: Jibus commentedI think it's should be set at the top of the file.
Comment #6
nitin.k CreditAttribution: nitin.k as a volunteer and commentedIs this really makes difference to set the custom rules on the top of file ?
I have put all the rules to the bottom of the file but did not get proper redirection.
Comment #7
Neograph734Yes the order does matter. Placing them at the bottom of the file means they are placed below lines 112-117:
So I suppose they will never be reached.
Comment #8
Jibus CreditAttribution: Jibus commentedClosing issue since no activity, feel free to re-open if you need more informations.
Comment #9
boinkster CreditAttribution: boinkster commentedI had the same problem migrating to a new domain but needed to keep the services endpoints active on old domain since they were externally active. It needs to go right after the RewriteEngine on
The key was including a RewriteCond for index.php:
Posting this here because it took awhile to track this down. Hope it helps