Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-05-18, 10:03:10

Author Topic: How to add www by default for websites  (Read 4806 times)

0 Members and 1 Guest are viewing this topic.

Offline befree22

  • Valuable Member
  • *
  • Posts: 95
  • Karma: +0/-1
    • View Profile
How to add www by default for websites
« on: 2013-07-13, 20:58:58 »
I'm using Kloxo-MR on my Centos 6 vps.

All of my sites are Wordpress sites but I'm migrating from DirectAdmin to Kloxo-MR. Hence, I'm manually installing Wordpress by ftp.

A default install of Wordpress doesn't include the www as the permanent url. Instead, it just uses mydomain.com. I want the permanent url to be www.mydomain.com

How do I setup domain in Kloxo-MR so that by default, www is used in the domain name? Could someone help me figure out the code to use?

Thanks
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: How to add www by default for websites
« Reply #1 on: 2013-07-13, 23:26:14 »
Try enable 'Force Redirect Domain.com To Www.domain.com' on 'Misc Config'
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline pohon

  • Junior Member
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
    • http://www.pohon.web.id
Re: How to add www by default for websites
« Reply #2 on: 2013-07-18, 00:53:56 »
Is it inside Kloxo? Or I have to use ssh?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Need hosting with UNLIMITED SPACE?
Look at Pohon Web
Give your id at this forum and get special price.

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: How to add www by default for websites
« Reply #3 on: 2013-07-18, 02:38:19 »
Quote from: "pohon"
Is it inside Kloxo? Or I have to use ssh?
Yes - it is part of kloxo, click the Misc Config button.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline mhzare

  • Junior Member
  • *
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: How to add www by default for websites
« Reply #4 on: 2013-07-18, 06:28:15 »
Quote from: "befree22"
I'm using Kloxo-MR on my Centos 6 vps.

All of my sites are Wordpress sites but I'm migrating from DirectAdmin to Kloxo-MR. Hence, I'm manually installing Wordpress by ftp.

A default install of Wordpress doesn't include the www as the permanent url. Instead, it just uses mydomain.com. I want the permanent url to be http://www.mydomain.com

How do I setup domain in Kloxo-MR so that by default, www is used in the domain name? Could someone help me figure out the code to use?

Thanks


you can put those code in  .htaccess file for permanent redirect , too
Code: [Select]

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: How to add www by default for websites
« Reply #5 on: 2013-07-18, 19:07:01 »
Quote from: "mhzare"
Quote from: "befree22"
I'm using Kloxo-MR on my Centos 6 vps.

All of my sites are Wordpress sites but I'm migrating from DirectAdmin to Kloxo-MR. Hence, I'm manually installing Wordpress by ftp.

A default install of Wordpress doesn't include the www as the permanent url. Instead, it just uses mydomain.com. I want the permanent url to be http://www.mydomain.com

How do I setup domain in Kloxo-MR so that by default, www is used in the domain name? Could someone help me figure out the code to use?

Thanks


you can put those code in  .htaccess file for permanent redirect , too
Code: [Select]

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]


There is no need to put it in the .htaccess file - when you turn on the option in misc config in kloxo it adds the rewrite rule in the config for the site.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline befree22

  • Valuable Member
  • *
  • Posts: 95
  • Karma: +0/-1
    • View Profile
Re: How to add www by default for websites
« Reply #6 on: 2013-08-07, 05:38:17 »
Quote from: "chrisf"
Quote from: "pohon"
Is it inside Kloxo? Or I have to use ssh?
Yes - it is part of kloxo, click the Misc Config button.

This worked for me. No need to mess with the .htaccess file at all.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.066 seconds with 22 queries.

web stats analysis