Project:Path redirect
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Issue tags:domain access

Issue Summary

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!

Comments

#1

Status:active» postponed (maintainer needs more info)

Can you please try on the latest 5.x-1.x version of the module?

#2

You 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)

#3

Version:5.x-1.1» 6.x-1.0-beta4

I 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?

#4

My 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/

AttachmentSizeStatusTest resultOperations
253612-subdomain_redirect.patch1.28 KBIgnored: Check issue status.NoneNone

#5

Status:postponed (maintainer needs more info)» needs work

#6

Version:6.x-1.0-beta4» 6.x-1.0-beta6
Category:support request» feature request
Status:needs work» needs review

Hi,

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:

-        $conditions[$field] = "$field = " . dB_type_placeholder($type);
+        $conditions[$field] = "$field = " . db_type_placeholder($type);
AttachmentSizeStatusTest resultOperations
path_redirect_domain.patch8.02 KBIgnored: Check issue status.NoneNone

#7

Thanks very much for this function. Will be useful to rising Domain Access users.

#8

Version:6.x-1.0-beta6» 6.x-1.x-dev
Status:needs review» needs work

#9

hello, is where any way for redirect from subdomain/absolute url ?

#10

ionmedia, 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.