Closed (duplicate)
Project:
Global Redirect
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Aug 2009 at 23:00 UTC
Updated:
26 Nov 2010 at 23:49 UTC
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
Comment #1
alexanderpas commentedI'm extending this feature request, to allow inter-subdomain redirection.
Suggested options:
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/loginto prevent lockout.-
/admin*(notice is generated when not in redirect target)Comment #2
alexanderpas commentedComment #3
chrisschaub commentedI 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.
Comment #4
chrisschaub commentedChanging title back, again. Sorry.
Comment #5
SeanBannister commentedI 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.
Comment #6
dave reidThis 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.
Comment #7
alexanderpas commentedmay 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.
Comment #8
SeanBannister commented@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.
Comment #9
alexanderpas commentedanother 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.
Comment #10
nicholasthompsonThe fix suggested in #304025: not working when drupal is installed in a subdirectory for a different issue would also solve this issue (by setting a site-wide base URL for redirects).
Marking this as a duplicate.
Comment #11
patcon commented@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 :)