Closed (fixed)
Project:
Redirect
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2011 at 18:11 UTC
Updated:
5 Sep 2018 at 11:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Connor Gilbert commentedMy Drupal site lives in a subdirectory with some rewrites that affect the URL path, and my URL redirects were returning Drupal 404s. This patch solved the issue for me.
Comment #2
Anonymous (not verified) commentedThanks for the patch, this solved my problem!
Please update the module with this patch
Comment #3
jaydub commentedComment #5
dave reidI'm not quite I understand if this is something Redirect should fix or if it's an environment problem.
What are the two values of $_SERVER['SCRIPT_NAME'] and $GLOBALS['base_path'] when this happens?
Comment #6
Ishino commentedI have a similar problem on a project. It's a hosting used for governement sites and they have a setup which isn't manageable for third parties.
When I check the values on DOMAIN.COM/blog which should be redicted, I get the following:
$_SERVER['SCRIPT_NAME'] = '/blog'
$GLOBALS['base_path'] = '/index.php'
So I not sure it's safe to check this before allowing redirects.
Comment #7
Ishino commentedI might take a look at the following: https://drupal.org/node/708972 which seems to be related.
cheers
Dries
Comment #8
matthew@lucidchart.com commented+1
Comment #9
derevo commentedThe patch in the OP no longer lines up with the line numbers in 7.x-1.0-rc1, but the patch itself seems to fix the problem. Redirects now work for me while serving Drupal from a subdirectory, with and without a subdomain.
The new line number that the patch should be applied to is line #1153 as of 7.x-1.0-rc1.
Thanks for your help gundarx!
Comment #10
wiredescape commentedBump... any update on this issue?
Thanks,
Comment #11
summit commentedHi,
Will with patch http://drupal.org/files/issues/redirect.module.patch Redirect work as subdirectory, but also still as directory?
I still didn't get redirect to work adding this patch....
I have upgraded website from D6 to D7 and I had taxonomy/term redirect in this website
Now the taxonomy/term redirect do not work anymore..
EDIT NO redirect is working anymore..
greetings, Martijn
Comment #12
mxwright commentedThe initial patch here worked for me, so I rerolled for 7.x-1.0-rc1
Comment #13
mxwright commentedSame patch, but for 7.x-1.x-dev
Comment #14
Anonymous (not verified) commentedpatch #12 worked for me
Comment #15
deanflory commentedWith the current 7.x-1.x-dev 2013-Oct-01 release, the patch in #13 applied with these results on Drupal 7.27 with the root in a subfolder:
Upon updating the site with the patched version of redirect, I am still not getting any functionality out of the redirect module.
None of the redirects work, automatically created nor manually created, so this patch did not fix my issue and there is clearly a major problem with the module on my install on my server.
Comment #16
mxwright commented@deanflory This patch also stopped working for me some time ago, so I retried it recently and after a lot of cache clearing, it seems to work again.
Besides the cache-clearing, one issue seemed to be the amount of circular redirects I had in place (where url alias and redirect match), due to previous importing of nodes during development.
I got rid of those and applied the patch from this issue to prevent it from happening again: #1796596: Fix and prevent circular redirects
Hopefully works for good now!
Comment #17
pere orgaClosed #1560076: Bluehost - not working for Primary Domain in a sub-dir as a duplicate of this one
Comment #18
aaronschachter commentedPatch in #13 works for me on my Bluehost hosted site. Running Redirect 7.x-1.0-rc1.
Comment #19
chellman commentedPatch #13 works here too and doesn't seem to cause any ill effects. I've rerolled it against dev.
Comment #20
feddovdm commentedGreat, patch #13 works!
Comment #21
dave reidComment #24
beckydev commentedWanted to give my thanks to #7 which pointed me to the right fix for my issue using 7.x-1.0-rc3 (which has the patch in this post applied).
Comment #25
markusd1984 commentedI have this in the current version, but in my case, the check prevents the redirecting from working, even though my rewrite points to /index.php.
https://www.drupal.org/project/redirect/issues/2995563#comment-12760644
When I disable it my redirects get access and are working. Any ideas?