How to remove WWW from my website url

mspecialist20023074

New Member
YetiShare User
Wurlie User
Oct 5, 2013
5
0
0
Hi

I was wondering How can I remove WWW from my website url
For example my website is :
http://www.mydomain.com/

I want it to be :

http://mydomain.com/

Also I want to remove the www from "Short Url Domain" section (drop down list) in the index page so when the people converting the url the result be without www and become shorter

Regards.
 

ysmods

New Member
Jan 29, 2013
860
1
0
UK
www.ysmods.com
Uncomment the following in the .htaccess file (remove the # from the start of the line).

Code:
#RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
#RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Edit the 2 sections in _config.inc.php below

Code:
/* site url host without the http:// and no trailing forward slash - i.e. www.mydomain.com or links.mydomain.com */
define("_CONFIG_SITE_HOST_URL",         "site_url_here.com");  

/* full site url without the http:// and no trailing forward slash - i.e. www.mydomain.com/links or the same as the _CONFIG_SITE_HOST_URL */
define("_CONFIG_SITE_FULL_URL",         "site_url_here.com/short_url");