The Global Redirect module has three main features:
If you search around the Web for Drupal SEO tutorials, many people recommend using mod_rewrite rules in an .htaccess file to deal with issues like removing trailing slashes. But on sites that also have non-Drupal content, you may have URLs that do have trailing slashes.
A slash is the symbol for a directory. For example, in the URL http://example.com/ the trailing slash is the symbol for the root directory of example.com. If you leave the trailing slash off, the server will add it. If you request a physical directory on a Drupal site (or any site) like http://example.com/modules the server will correct you by appending the trailing slash: http://example.com/modules/. If you have non-Drupal content on your server—perhaps a WordPress blog at http://example.com/software/—you will have URLs with trailing slashes. The WordPress blog would not be located at http://example.com/software, it would be located at http://example.com/software/. You would not want to remove trailing slashes from all URLs.
That is why the Global Redirect module is a good option. It will only remove trailing slashes from URLs that are handled by Drupal.
Did you find this post helpful? Leave a comment below, and subscribe to my RSS feed.
Comments
Removing trailing slashes in maintenance mode
Just a little detail:
While in maintenance mode, removing of trailing slashes doesn't work. I have just installed global redirect module and enabled removal of trailing slashes on a site which is currently under construction, so it is in offline - maintenance mode. Then I noticed that urls with trailing slashes aren't redirected. I spent half an hour figuring out what is wrong, I even checked .htaccess few times before I tried to see if it works when I turn site into online mode. And, of course, it works.
global redirect
I'm not sure if that is a critical issue because it's unlikely Google would find URLs with trailing slashes while a site is in maintenance mode.
If the site is in maintenance mode for long periods of time (weeks) it might be better not to have it crawled during that time at all.
Not critical
That's not critical issue of course. Not at all. I posted that note just to save someone's time if bump into same situation and try to figure out what's wrong.
thanks. that was a noble
thanks. that was a noble thought for the community. one question... By default, "Menu access checking " is disabled in the Global Redirects module configuration. It sites 'to avoid any unexpected behaviour'. Can anyone please tell me what the 'unexpected behaviour' could be? and also why do i need to enable it. I mean won't the access permission be checked anyways? Thanks.