Project:Global Redirect
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

I'd like to suggest a switch for global redirect that, if enabled, would force all requests to be http://www... . This is the same functionality provided by the .htaccess file that ships with Drupal, but it would be handier to set it in the database, especially for managing large numbers of sites with svn. It's a real pain to have to edit the .htaccess file, especially when it is modified by the core developers.

So, just a switch to ensure all requests go to "www." prefixed version of the site domain. Thanks for your consideration.

Comments

#1

Title:Force www prefix in url» Support Inter-subdomain Redirection ()

I'm extending this feature request, to allow inter-subdomain redirection.
Suggested options:

  • redirect ALL subdomain.example.com to example.com
  • redirect ALL subdomain.example.com to www.example.com (exclude example.com)
  • redirect ALL subdomain.example.com to www.example.com (include example.com)
  • redirect ONLY www.example.com to example.com
  • redirect example.com to www.example.com
  • redirect example.com to SPECIFIC subdomain.example.com

to ensure sites stay accessible, you need to access the site trough the destination subdomain, and the following url's shoudn't get redirected
- /user/login to prevent lockout.
- /admin* (notice is generated when not in redirect target)

#2

Title:Support Inter-subdomain Redirection ()» Support Inter-subdomain Redirection (no-www support)

#3

Title:Support Inter-subdomain Redirection (no-www support)» Support no-www 301 redirect switch in global redirect

I think we should leave this request as I initially posted, for simplicity sake. What you propose is useful and a good feature request -- it's just harder to implement and affects more places in core and especialy contrib modules. My original request is meant to simplify the administration of an already existing feature in .htaccess, a feature that is hard to manage when it's coded in a file like .htaccess, especially for multisites and using source control like svn and cvs. I'd suggest you open a separate feature request. I'm also switching the title of this thread back to reflect my original intent.

#4

Title:Support no-www 301 redirect switch in global redirect» Force www prefix in url

Changing title back, again. Sorry.

#5

I strongly disagree that we should just forward to www. because currently I have mod_rewrite rules to do the opposite, remove www. (http://no-www.org)
I think we'd have to give users both options if this feature was provided otherwise in Google's eyes I'm 301 redirecting my entire site to a new domain. Sure it would probably only have short term impact but I really don't want to take the chance.

#6

Status:active» postponed

This is something that is much better handled by rewrite rules since it works on a domain level. I'll leave it as postponed, but I don't think this is a good idea for the module.

#7

may i point out my idea in comment #1 again, as that might be a suitable request.

@5
Don't worry about those 301 redirects ;)
http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93633

@6
since we're already redirecting, i don't think this will be a large performance hit.
Actually, this might even save some redirects because, instead of redirecting twice (once htaccess, once globalredirect) we now only redirect once

Example:
Before:
http://www.example.com/node/1 ->(.htaccess)-> http://example.com/node/1 ->(globalredirect)-> http://example.com/about
After:
http://www.example.com/node/1 ->(globalredirect)-> http://example.com/about

and remember, internal url's usually aren't redirected because they're correct already, it's those manually typed or old url's on other sites that are the problem.

#8

@alexanderpas: Not sure what you meant by "Don't worry about those 301 redirects". I'll take it from the *wink* that you were being sarcastic?

I'm a fan of this feature for it's usability improvements, and because it promotes best practice. The majority of users would never setup 301s in this case, but if we provided an option in the interface "Use www.", "Use non-www" it's a nice little reminder that users can choose.

#9

another reason why we might want this feature, is to support a multiple site, with different domains, on a single drupal installation, where one site is using www (or another sub-domain) and another site isn't.

See also #352180: Better, multi-site friendly "www." addition/removal in .htaccess for the current developments in core.

#10

Status:postponed» closed (duplicate)

The fix suggested in #304025: not working when drupal is installed in a subdirectory - base path config option patch for a different issue would also solve this issue (by setting a site-wide base URL for redirects).

Marking this as a duplicate.

#11

@SeanBannister @8
When they said "don't worry", I figured they meant "Google won't penalize you". Far as I know, that was a common-held belief (and fact, at one point), until a recent interview:
http://www.seroundtable.com/archives/021832.html

I think it's minimal though. From what I gather, the decay in PR seems to depend largely on whether the structure of the redirected page (anchors, links, headings, etc) varies greatly from the original cached one (?). But it's all hearsay, I suppose :)

nobody click here