Force www prefix in url

lutegrass - August 9, 2009 - 23:00
Project:Global Redirect
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

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.

#1

alexanderpas - August 17, 2009 - 13:06
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

alexanderpas - August 17, 2009 - 13:07
Title:Support Inter-subdomain Redirection ()» Support Inter-subdomain Redirection (no-www support)

#3

lutegrass - August 18, 2009 - 01:09
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

lutegrass - August 18, 2009 - 01:10
Title:Support no-www 301 redirect switch in global redirect» Force www prefix in url

Changing title back, again. Sorry.

 
 

Drupal is a registered trademark of Dries Buytaert.