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
0
votes
1 answer

Correct way of handling www. and non www. when working with sessions

Only today found out that the two are not the same site and infact copies of eachother. The error i am currently having is i am setting on login sessions in the normal way: $_SESSION['logged'] = 1; This session can be received and works…
Lovelock
  • 7,689
  • 19
  • 86
  • 186
0
votes
1 answer

What's wrong with IIS7 rewrite rule

I'm trying to do a simple redirect from the www subdomain to the root domain. After trying many variations, I'm stuck and hoping for help. Feeling sure it's something stupid, but can't see it. Here's the rule I'm using.
0
votes
1 answer

How do I make all pages have www in front of them?

I have a website that is http://www.example.com. However, Google is showing it as example.com. It even has different cache's. One for www.example.com and one for example.com. When I type it into my address bar they come out the same, but Google…
Tim
  • 63
  • 1
  • 1
  • 10
0
votes
1 answer

Adding 'www' to url via .htacess mod_rewrite does not work

Here is the sample found in numerous posts RewriteEngine On RewriteCond %{HTTP_HOST} ^yatko.com[NC] RewriteRule ^(.*)$ http://www.yatko.com/$1 [R=301,L] *wanted to rewrite the main domain only leaving the addon/parked domains unaffected - the…
Yatko
  • 8,715
  • 9
  • 40
  • 46
0
votes
2 answers

How to ignore "http://" and "www." when i search an url using ActiveRecord

I have the following code in my urlSearch model: def find_url(orig_url) url = find_by(url: orig_url) unless url # some stuff end end Here find_by will search for the exact string passed to it which is : orig_url argument in my…
medBouzid
  • 7,484
  • 10
  • 56
  • 86
0
votes
2 answers

Wordpress site url missing www prefix after installation under nginx server

I am in the process of migrating my wordpress, website www.programminginc.net, which is presently running on a shared hosting site, to a VPS Server with nginx Server. I have selected an Ubuntu 12.04.3 LTS server for my VPS hosting. I could complete…
0
votes
1 answer

Nginx config redirect www

I'm having trouble figuring out my nginx config. My config is supposed to force the use of https and no www. Some subdomains api.domain.com, api.staging.domain.com is allowed. The last mentioned is currently configured in another conf file, not…
charliexx
  • 423
  • 2
  • 7
  • 15
0
votes
1 answer

Rewrite so sub domain works when www. in typed in front

I know this is fairly straightforward rewrite but I can not get it working and have searched for similar question. I have created several sub domains for my client. However, many visitors are still typing www. in front of sub domain. I need…
0
votes
0 answers

.htaccess removing www only from live site

Is it possible to conditionally include the rewriterule that removes www from a URL only on a live site? I have site.dev and staging.site.com and site.com setup but I only want to have one .htaccess file to keep track of. Currently my .htaccess…
Stuart McCoy
  • 145
  • 2
  • 8
0
votes
1 answer

Combining URLs with & without subdomain prefix

On the root of my hosting account sit two important folders: httpdocs and subdomains Now in order to silently load page index.htm for all four of the domainvariations (below) I'm stuck in that bits n pieces from other answers don't join up well…
Sam
  • 15,254
  • 25
  • 90
  • 145
0
votes
1 answer

Cyclic redirection in .htaccess

I have the following .htaccess file: AddDefaultCharset utf-8 RewriteEngine on Options +SymLinksIfOwnerMatch RewriteBase / # redirect all www-requests to no-www # - RewriteCond %{HTTP_HOST} ^www\.site\.com$ [NC] RewriteRule ^(.*)$ http://site.com/$1…
wh1t3cat1k
  • 3,146
  • 6
  • 32
  • 38
0
votes
1 answer

Add www prefix to a domain in Plesk Parallels

I have just set up my first domain in plesk (v10 I think? Newest version). I am used to using shared hosting where the www is set up, but upon setting up my domain only http://retapy.com will work, and http://www.retapy.com wont work. I have had a…
SW_Cali
  • 383
  • 2
  • 17
0
votes
2 answers

New htaccess file - 301 re-directs and trailing slash

I am new here, I really need help I am creating a new site with opencart version 1.5.5.1 & I have tried creating my own htaccess file but it is not doing what I want it to do. I have tried a lot of the code from this site and my host sd, opencart is…
0
votes
1 answer

Website going down intermittenty, but server is always up

I have recently set up my domain, but my problem is when I navigate with/without www, the results are inconsistent. They are supposed to point to the same page, but sometimes, the www site has broken links to non-www components (e.g.: when I load…
S R
  • 157
  • 1
  • 2
  • 12
0
votes
1 answer

GlassFish app cannot be accessed with www URL

When I deploy my application locally or on the server, I can always access the app at either http://localhost:8080/myApp/ or http://example.com/myApp. However, whenever I add www to either of the URLs, on Chrome, I get the error Oops! Google Chrome…
Mr.J4mes
  • 9,168
  • 9
  • 48
  • 90