Jump to content

.htaccess subdomain with www


Raiper34
 Share

Recommended Posts

Hi, i have subdomain buildasnowman.raiper34.net but when i write this subdomain with www, it does not work. I try all possible and inpossible with .htacces but nothing work... I think i make mistake somewhere... but i do not know where...Now onyl work buildasnowman.raiper34.net but i want to make, that all work... without www and with www... 

 

Please help...

Link to comment
Share on other sites

For that kind of question, google might be a better place to start with.

 
But here is your answer anyways :D

Hope it helps:

Force WWW

RewriteEngine OnRewriteCond %{HTTP_HOST} ^your-site.com [NC]RewriteRule ^(.*)$ http://www.your-site.com/$1 [L,R=301]

 

Remove WWW

RewriteEngine OnRewriteCond %{HTTP_HOST} !^your-site.com$ [NC]RewriteRule ^(.*)$ http://your-site.com/$1 [L,R=301]
Link to comment
Share on other sites

It hurts my feelings every time when I see something like that :(

 

Look, you have toplevel domains, domains and subdomains.

http://ebay.com

 

The Toplevel Domain is ".com" - the domain is "ebay".

We have NO subdomain here.

 

Then, there is:

http://www.ebay.com

 

We have the toplevel Domain ".com", the domain "ebay" and the SUBDOMAIN "www".

The subdomain www was often applied in the beginnings of the internet to show people: You will find a webserver here. No Telnet, FTP or whatever.

 

So when you say you have this:

 

buildasnowman.raiper34.net (We have: TLD ".net", Domain "raiper34" and subdomain "buildasnowman")

 

And you say you want to prefix that with a "www." - my heart starts to bleed.

 

No offense.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...