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.
Hi,
I use Domain Access module and want to redirect subdomain1.example.com/a1 to subdomain2.example.com/a2, what should I do? at path_redirect/new only Drupal path or path alias is allowed. If I try "from a1 to subdomain2.example.com/a2" , it redirects me from example.com/a1 not from subdomain1.example.com... Thanks!
Comment | File | Size | Author |
---|---|---|---|
#6 | path_redirect_domain.patch | 8.02 KB | marcvangend |
#4 | 253612-subdomain_redirect.patch | 1.28 KB | Jackinloadup |
Comments
Comment #1
Dave ReidCan you please try on the latest 5.x-1.x version of the module?
Comment #2
nirvanajyothi CreditAttribution: nirvanajyothi commentedYou can do this by adding the redirect from the from the subdomain from where you wish to redirect. ie., subdomain/admin/build/path-redirect/add (instead of from example.com/admin/build/path-redirect/add)
Comment #3
leenwebb CreditAttribution: leenwebb commentedI added a redirect from abc.mysite.com/specialURL (a subdomain) but the redirect is applying to www.mysite.com/specialURL (the main domain) as well. Is there any way to have the redirect ONLY apply to the subdomain URL?
Comment #4
Jackinloadup CreditAttribution: Jackinloadup commentedMy need is slightly different then what is originally posted on this issue. I want to redirect users from devsite1.mysite.com to somesite.com
The patch below will make any of these options
devsite1.mysite.com
devsite1.mysite.com/node/*
devsite1.mysite.com/anything
and redirects it to
somesite.com
We wanted to make it so when we moved out development site live and clients who didn't update their bookmarks would get directed to the correct website.
how it works:
when adding a redirect the from field needs to be the whole subdomain path including http:// like so
http://devsite1.mysite.com/
then in the To field put the forward address like normal
http://somesite.com/
Comment #5
Dave ReidComment #6
marcvangendHi,
Here is a patch against Path Redirect 6.x-1.0-beta6 that allows integration with domain module. I have tried to make it as clean as possible, but there may well be room for improvement - consider it a starting point. Without this patch, path redirect does work together with domain access, but every redirect works on all domains and always stays on the same domain.
This patch:
- redirects from a certain domain to another domain
- adds two columns in the database to store source domain and redirect domain (updated schema and update function are included in the patch)
- adds two domain select fields on admin/build/path-redirect/add
- adds a checkbox to the settings page to enable per-domain redirection
- shows the from and to domains in the redirects list
- of course checks if domain.module is installed
I'm looking forward to your reviews.
By the way:
I also fixed a small typo in this patch:
Comment #7
nirvanajyothi CreditAttribution: nirvanajyothi commentedThanks very much for this function. Will be useful to rising Domain Access users.
Comment #8
Dave ReidComment #9
ionmedia CreditAttribution: ionmedia commentedhello, is where any way for redirect from subdomain/absolute url ?
Comment #10
marcvangendionmedia, this topic is not a help forum, it's the place where we discuss changes to the Path Redirect module in order to make it work together with the Domain Access module. If you need help with the path redirect module, please open a support request issue. If you need general help, open a new forum topic.