Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Globalredirect #7

Closed
paulkolbovich opened this issue Jun 9, 2011 · 9 comments
Closed

Globalredirect #7

paulkolbovich opened this issue Jun 9, 2011 · 9 comments
Assignees

Comments

@paulkolbovich
Copy link

https://github.com/perusio/drupal-with-nginx/blob/master/sites-available/drupal.conf#L87 not working with globalredirect. Old variant rewrite ^/(.*)$ /index.php?q=$1 last; working great.

@perusio
Copy link
Owner

perusio commented Jun 20, 2011

Hello Paul,

I've investigated the issue. And the problem seems to come from the deslash setting which is enabled by default.

Here's the commit with a discussion on that. I've created a tiny Drupal 6 module that fixes the issue if you prefer not to deal with the hassle of checking the settings form.

Try it out and please report back.

Thanks,
António

@ghost ghost assigned perusio Jun 20, 2011
@sivaji
Copy link

sivaji commented Aug 15, 2011

Hello perusio,

Thanks for answering to my previous issues. I noticed that Global Redirect (and coder review) 7.x counts on "custom_url_rewrite_outbound" which means drupal_spaces.conf to be used. Would be nice if you could revise "Configuration Selection Algorithm" accordingly.

@perusio
Copy link
Owner

perusio commented Aug 16, 2011

Global Redirect doesn't use it. Just invokes the function if it exists. But that is incorrect custom_url_rewrite_outbound is a Drupal 6 only function. In Drupal 7 the corresponding function is now a hook: hook_url_outbound_alter. The issue with GlobalRedirect was on D6 and it's related to the handling of the trailing slash on URIs.

@perusio
Copy link
Owner

perusio commented Aug 19, 2011

I think this is fixed. Re-open if issue resurfaces.

@perusio perusio closed this as completed Aug 19, 2011
@sivaji
Copy link

sivaji commented Aug 19, 2011

perusio, sorry for not updating you. You are right, global redirect looks for an abandoned function.

The code I mean is here,

// TODO: This looks wrong for D7... maybe a hook? if (function_exists('custom_url_rewrite_outbound')) { // Modules may alter outbound links by reference. custom_url_rewrite_outbound($alias, $options, $current_path); }

I am experiencing a strange infinite redirect problem when switching from one language to another when global redirect and local enabled. I thought this could be a problem with my nginx configuration. Anyway the site I develop will only have English for now. Thanks for your assistance.

@perusio perusio reopened this Aug 19, 2011
@perusio
Copy link
Owner

perusio commented Aug 19, 2011

I've reopened. Could be. Can you show me the logs? Preferably with the debug flag set.

Thanks,

@sivaji
Copy link

sivaji commented Aug 20, 2011

perusio, don't worry the infinite redirect happens in apache as well. This could be an issue with globalredirect module http://drupal.org/node/1145802

@perusio
Copy link
Owner

perusio commented Jan 16, 2012

This is documented and the fix is easy. Just set:

drush vset deslash 0

when globalredirect is active.

@perusio perusio closed this as completed Jan 16, 2012
@ilmarioranen
Copy link

Thanks perusio. The drush (or $conf) solution works. Apparently settings that variable manually can be done in language settings:
http://drupal.org/node/1378690#comment-5467960

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants