Not redirecting (possibly an issue with installations in subfolders)

chris.mccreery - January 20, 2009 - 04:01
Project:Global Redirect
Version:6.x-1.2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs work
Description

I'm sorry I'm fairly new to Global Redirect module. I've installed the latest version (1.2) on Drupal 6.9 with path module and pathauto module. I've created a new page and then tried accessing it using the node number and it still displays and doesn't forward to the clean url version. Am I missing something here?

#1

jaharmi - January 28, 2009 - 02:35

I'm seeing the same thing, with pages on Acquia Drupal 1.2.1 (Drupal 6.9). I'm also up-to-date with Global Redirect.

For example:

http://www.jaharmi.com/node/383
http://www.jaharmi.com/2009/01/27/check_a_new_version_of_acquia_drupal_i...

Is there any other information (logs or otherwise) that I can provide to help determine what might be going awry?

#2

MrMac - January 28, 2009 - 03:15

I am having the same issue. D 6.9 and GR 6.x-1.2
Pathauto and Path also installed and running.

#3

midkemia - January 28, 2009 - 08:57

Running latest Drupal, Pathauto and Global Redirect and NOT seeing this issue , if that helps

#4

czeky - January 28, 2009 - 22:04

Hi, same here, nodes in node/1 etc are not redirected to pathauto alias, any ideas?

#5

midkemia - January 28, 2009 - 22:56

The only things i can think of are if drupal is installed in a subdomain or a folder rather than in root

that is

mydomain.com/drupal

or

drupal.mydomain.com

rather than in

mydomain.com

#6

czeky - January 29, 2009 - 08:52

Yes, it is in folder, could it be the issue?

Thanx

#7

midkemia - January 29, 2009 - 09:00

Its possible - Here is a previous issue http://drupal.org/node/343701 When i was developing my site i had it in a folder/subdomain and re-direct didnt work within its installation. As soon as i moved to live - root all worked perfect. Not sure why this is but it may at least help identify the cause

#8

nicholasThompson - January 29, 2009 - 09:34
Title:Not redirecting» Not redirecting (possibly an issue with installations in subfolders)
Category:support request» bug report

Hi guys - just so you know I am following this issue but I'm ridiculously busy at the moment.

I'll try to find time to look into this - but it is likely an issue with a subfolder. Sub domains wont effect GlobalRedirect (as, technically, www. is a subdomain and I've had no problems with www.example.com type sites.).

#9

midkemia - January 29, 2009 - 10:16

I accept what your saying about subdomains iI know very little as to how servers work , but as a thought

my working site www.mydomain.com is located at

public_html/

a sub folder would be

public_html/drupal

if I had a subdomain called drupal.mydomain.com it is also located at

public_html/drupal

In theory it can also be called from www.mydomain.com/drupal

Maybe there is something outside the folder causing the issue

#10

jaharmi - February 4, 2009 - 02:32

My site is also located in a subfolder of my public_html folder. I just checked, and it’s available through both example.com and example.com/example. Node and Pathauto URLs also work with the folder name after the slash, at the root of the site. Hm.

Maybe if the URL is rewritten so that portion doesn’t appear, ever … ?

I don’t recall this being a problem with Global Redirect on Drupal 5, before I upgraded to Drupal 6 via Acquia Drupal. But I don’t know that I ever specifically checked, either.

#11

nicholasThompson - February 8, 2009 - 11:50
Component:User interface» Code
Priority:normal» critical

Sounds like an issue with installations in subfolders... I'll have to test. Upping to critical.

Cheers.

#12

nurrad - February 18, 2009 - 15:29

I have drupal installed into the root directory of my site and it does not redirect either..
So.. Possibly not a subfolder issue.
That being said, I have a large taxonomy that is displayed via taxonomy_DHTML (or, was until today. I opted to use a php snippet instead for now, but its ugly) and that module does not support/request Pathauto, so all the terms are linked to a drupal version and not pathauto. None of those links are redirected.

I would like to see whats going on?
Thanks

#13

nicholasThompson - February 18, 2009 - 17:12

nurrad, if you make links in your PHP snippet using the l function, then aliases are picked up automatically.

As for other people - I cant replicate it at the moment so the more information you can supply me with (such as URL, server config (eg PHP versions, etc) and anything else you deem relevant) would really help.

Cheers

#14

midkemia - February 18, 2009 - 19:25

I can give you a couple of links for comparison, though will take the second one off line after a few days ( its not normally live)

http://www.crydee.com

to get to the second site replace "www" with "cms2" I havn't used a link as i dont want it indexed

On the right side you should see a Quiz banner under test your knowledge

in the first site mouse over indicates "node/10261" when cliked it re-directs to ..../quiz

for the second link (cms2) mouse over indicates "node/10261" when cliked it re-directs to "node/10261" :)

The second site is basically a clone of the main though some modules are now out of date and its still on 6.8

MySQL database 5.0.67
PHP 5.2.6
PHP memory limit 128M
PHP register globals Disabled

Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8b DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

#15

midkemia - February 19, 2009 - 06:02

I would have posted this sooner but someone decided to upgrade drupal moments after i posted. :) I would also have edited my last post but they broke that too !

I found what appears to be the cause in my case, and something i hadn't realised.

After creating my post i remembered I had forgotton to put the second site online. And there was the Answer ( both sites web based) but if they are offline Globa Redirectl does not re-direct. This may be the issue or by design

#16

usa2k - March 25, 2009 - 09:51

Subscribing

In my case, I have an internal server (Intranet)
(Orig URL) Link http://192.168.0.88/repair/node/1568
(URL Alias) Link http://192.168.0.88/repair/content/304-0111d

It does not redirect on D6.10

EDIT: Not 100% sure I need this module?
I cleared out a whole list of records and regenerated them with
Alias URL and Node Autotitle set right and I seem to only get aliased URLs.

Still new and learning here ...

#17

davidjg - March 25, 2009 - 12:33

Apologies but I'm still confused after reading... Should global redirect 6.x-1.2 module be working on drupal 6.10 if drupal is installed in a subdirectory, e.g. www.example.com/drupal, do people have global redirect working if set up like this?

Thanks.

--Dave

#18

danfinney - April 27, 2009 - 19:09

Having a similar issue with the XML path showing the url without a trailing slash, but the site redirects to using the trailing slash. Full details below.

XML Base Path - Google Webmaster Tools Redirect Error

http://drupal.org/node/446280

#19

robertjd - May 5, 2009 - 22:15

I am having this problem as well and it does seem to be subfolder related. I have drupal setup in a subdirectory, like so:

~/public_html/robertjd/drupal

where ~/public_html/robertjd/ is the web root for www.robertjd.com with a rewrite to /drupal using the following .htaccess in ~/public_html/robertjd

RewriteEngine on
RewriteRule (.*) drupal/$1 [L]

$base_url in sites/default/settings.php is

$base_url="http://www.robertjd.com";

Thus, my $GLOBALS['base_path'] is "/" and $_SERVER['SCRIPT_NAME'] is "/drupal/index.php" which is the conundrum outlined here: http://drupal.org/node/304025

Is there a way out of this by not setting $base_url and doing some fancy apache rewriting?

#20

dawansv - June 10, 2009 - 18:33
Status:active» needs work

Ok, so I have the exact same problem. My $GLOBALS['base_path'] is "/" and $_SERVER['SCRIPT_NAME'] is "/drupal6/index.php" (on my production server) while it is fine on my development server (I don't use a subfolder there).

I think I might have found a way to fix it (at least in my setup) using the SERVER[REQUEST_URI] and SERVER['REDIRECT_URL'] variables. In a simple subfolder rewrite rule, SERVER['REDIRECT_URL'] is in fact equal to /subfolder/SERVER[REQUEST_URI], so I extract the subfolder from the difference, then add it to the test...

Problem is this is assuming either no rewrite rule or a rewrite rule producing the redirect above, so this will break down if other kind of redirect takes place where the second part of SERVER['REDIRECT_URL'] is not SERVER[REQUEST_URI] (or both are equal if no redirect).

But here are my changes that for me makes the same code work on both dev and production server...

I change:
if ($_SERVER['SCRIPT_NAME'] != $GLOBALS['base_path'] .'index.php') return FALSE;

to:

$request = $_SERVER['REQUEST_URI'];
$redirect = $_SERVER['REDIRECT_URL'];
$redirect_path = substr ($redirect,0,strpos($redirect,$request));
if ($_SERVER['SCRIPT_NAME'] != $redirect_path . $GLOBALS['base_path'] .'index.php') return FALSE;

#21

portulaca - July 11, 2009 - 23:59

GR is not working on one of my multisites, but at the same time it works on others.

On the site where it doesn't works I recently generated all the aliases, and aliases work ok, but entering node/ID into address bar doesn't redirect it to the alias.

GR works ok on my local installation, even for the site that doesn't work on host.

Can I work around it by excluding node/ID from indexing using robots.txt?

 
 

Drupal is a registered trademark of Dries Buytaert.