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 have an old url with path :
http://seasecret.biz/he/החנות-שלנו
That I want to redirect to a new path alias :
http://seasecret.biz/he/חנות/בגדי-ים-צנועים
I have done the redirection for only hebrew language, but I soon as I click on the old URL I have an error 404.
Regards
Comment | File | Size | Author |
---|---|---|---|
#10 | 744730_subpath_alias_compat_5-D6.patch | 802 bytes | greggles |
#6 | 744730_subpath_alias_compat_4-D6.patch | 1.15 KB | greggles |
#5 | 744730_subpath_alias_compat_3.patch | 802 bytes | greggles |
#4 | 744730_subpath_alias_compat_2.patch | 660 bytes | greggles |
#3 | 744730_subpath_alias_compat.patch | 648 bytes | greggles |
Comments
Comment #1
redben CreditAttribution: redben commentedSubscribe, having the same problem.
FWIW, i have pathauto 1.3, subpath auto and global redirects enabled
Comment #2
gregglesI'm not sure how to fix this yet, but I found this behavior:
0. Install path_redirect
1. Create a node called "original node" with the alias "original-node" and another called "monkey pants" and the path "monkey-pants"
2. Create redirect from original-node/monkeypants to the path "monkey-pants"
3. Test the redirect, it works
4. Install url_alter, subpath_alias modules.
5. The redirect no longer works because "original-node/monkeypants" is expanded to "node/1/monkeypants" before path_redirect_get_path sees it.
I looked in $_SERVER and found QUERY_STRING which is q=original-node/monkeypants and therefore can be str_replaced to get the original request.
I could also see creating an implementation of hook_url_alter_inbound that stores the $path and $path_language in a static var so that path_redirect can find them later.
Comment #3
gregglesComment #4
gregglesUpdated patch after the previous had problems with trailing slashes.
Comment #5
gregglesYet another patch - we should strip the querystring from these.
Comment #6
gregglesWrong order of trimming query string and trailing slash...
Comment #7
Dave ReidTesting should work now...
Comment #8
zilverdistel CreditAttribution: zilverdistel commentedFor my website this wasn't enough, I also had to apply the patch at http://drupal.org/node/346911#comment-2392744, concerning the Global Redirect module.
Comment #9
jsobiecki CreditAttribution: jsobiecki commentedPatch from #6 works for me. Thanks!
Comment #10
gregglesReroll for offset. Still applies, still works.
Comment #11
szy CreditAttribution: szy commentedIt still works with today's dev (2013-May-25).
(and the problem with Subpath still persists).
Thank you for the patch!
Szy.
Comment #13
mdupontFYI Patch in #10 fixed the subpath / redirect conflict caused by path_alias_xt module, so it's not a fix specific to subpath alias.