Questions tagged [no-www]

The process of eliminating the usage of WWW to prefix URLs.

The process of eliminating the usage of www to prefix URLs, for instance by redirecting users from http://www.example/ to http://example/. www is by many considered a dead and unnecessary practice.

256 questions
1
vote
1 answer

URL re-write not working without www

I am having some issues with URL re-writing that I cannot figure out. Here's the problem. This URL IS NOT redirecting properly: http://domain.com/index.php?en=oldpage HOWEVER, this URL IS redirecting…
ADP
  • 39
  • 4
1
vote
2 answers

Redirect domain.com/folder with www to non-www and at the same time http to https

I have installed into a sub-folder of my domain a Web App. Example: domain.com/webapp I want to use the Web App with SSL enabled: https://domain.com/webapp I want to redirect at same time: WWW to NON-WWW and HTTP to HTTPS only for the sub-folder…
1
vote
3 answers

Django sitemap intermittent www

The automatic sitemap for my Django site fluctuates between including the www on urls and leaving it out (I'm aiming to have it in all the time). This has ramifications in google not indexing my pages properly so I'm trying to narrow down what would…
Jen Z
  • 205
  • 1
  • 2
  • 9
1
vote
1 answer

htaccess file ignoring www redirect

I finally got around to using htaccess to properly redirect my www pages to non-www urls, but I can't seem to get it to work in any way I've tried. I believe something that was included in the htaccess before I changed it is causing the problem. I…
utopiated
  • 11
  • 1
1
vote
1 answer

Redirect www and http requests to https://, catching all domains, in nginx

In nginx, we wish to redirect all requests sent to: https://www. http://www. http:// To: https:// ie SSL, without the www prefix, as a catch-all, without specifying each domain individually. The config we have come…
Kevin Sedgley
  • 1,049
  • 1
  • 11
  • 22
1
vote
1 answer

www.domain.tld vs. domain.tld

TL;DR Should I redirect from www.domain.tld to domain.tld or vice versa? I am running a CMS that handles multiple domains. Until now the CMS is in charge of redirecting www.domain.tld to domain.tld or vice versa for each domain individually, but…
mmgross
  • 3,064
  • 1
  • 23
  • 32
1
vote
2 answers

HTTPS www to non-www on NGINX

I'm having issues redirecting from www to non-www only for https/ssl. Any ideas why this might be happening? It works fine for non-secure URL's. Here's my config: html { # Compression # Enable Gzip compressed. gzip on; # Enable…
Gareth Daine
  • 4,016
  • 5
  • 40
  • 67
1
vote
0 answers

Forcing www version is adding ghost subdirectory

I've used this bit of code many times for my client's sites, but I'm getting a weird error on one of them. If I use this code, then try to test a non-www page to see if it will redirect, it inserts a subdirectory directly after the .com. For…
1
vote
4 answers

Django - remove www from URLs

I've added this to my .htacces: RewriteEngine on RewriteCond %{HTTP_HOST} ^www\. RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] but then trying to reach www.example.com redirects me to: http://example.com/example/wsgi.py/ because i have…
Ljubisa Livac
  • 819
  • 3
  • 13
  • 38
1
vote
1 answer

PHP - WWW website pre-fix and no pre-fix use different SESSION variables

When visiting my website using the www prefix from the no-www version (which I normally use) I find that I am no longer logged in... Why is this? Is there a way to have the two versions of the site use the same SESSION variable or at least redirect…
StrongJoshua
  • 975
  • 10
  • 24
1
vote
1 answer

Only the index in www points to different page

I have the following issue: When I tried to reach www.example.com/index.html I got a different page than the page example.com/index.html That problem is only on the main index file. Everything else is ok. e.g. www.example.com/folder/ is the same…
Greg
  • 343
  • 3
  • 17
1
vote
1 answer

Remove www from the url

Does anyone have the setttings from the .htaccess file to remove www from my url? http://example.com I've tried using some of the settings in the internet but it gives me a redirect loop. I need something that prevents a redirect loop. this would…
rj tubera
  • 747
  • 4
  • 29
  • 51
1
vote
1 answer

htaccess with www RewriteRule

I did cross-reference addresses without WWW to a WWW Now I have a problem, if I delete in the address bar WWW, I get an error this is a .htaccess: RewriteRule ^([^/\.]+)/([^/\.]+)/?$ ?page_id=$2 RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$…
allpnay
  • 539
  • 6
  • 19
1
vote
1 answer

htacess: triple rewrite HTTPS + no-WWW + no-.html

I am trying to write a multi rewrite function in htacess. change http into httpS remove www remove .html It should handle all the cases: http://www.example.com/about.html should be rewritten as http S://example.com/about But of course if there…
Ren
  • 47
  • 1
  • 6
1
vote
0 answers

how to convert www.example.com/posts/123 to example.com/posts/123?

I am using nginx 1.2.1 running in Ubuntu 12.10 I have followed the solution in https://stackoverflow.com/a/7958540/80353 So my vhosts now look like: server { listen 80; server_name www.example.com; return 301…
Kim Stacks
  • 10,202
  • 35
  • 151
  • 282