droidlabour
droidlabour

Reputation: 697

Redirect www.example.com to example.com

I've a domain hosted on bluehost with iLister CMS installed in, the problem which I'm facing is http://www.advett.com/admin isn't responding because I registered advett.com/admin in the site_url field of iLister license. How to redirect all the request for www.advett.com and www.advett.com/admin to advett.com and advett.com/admin respectively? I know it can be done with .htaccess but I've not been able to find a solution till now.

Upvotes: 1

Views: 1761

Answers (1)

Jon Lin
Jon Lin

Reputation: 143896

Try putting this in the htaccess file in your document root:

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

Upvotes: 1

Related Questions